Exercise 2 solution : Python tutorial 29

preview_player
Показать описание
Chapter 2 exercise 2 solution
Рекомендации по теме
Комментарии
Автор

print(("Your Name in reverse :"), input("Enter your name: ")[-1::-1])

manoharreddymalla
Автор

Great bhai vedio chhoti thi par damdar vedio thi.... 💖

vipinchauhan
Автор

I have done this way and it works

name = input("enter your name: " )
print("Reverse of your name is : " + name[::-1])

PremKumar-jkrf
Автор

U can also do this ..
name=input("type your name : ")
print(name [-1: :-1])

ratishkumar
Автор

I print it before watching, But your code is unique. Love you, Brother.

nadimahmed
Автор

sir u are an good explainer keep it up

usama
Автор

bhai maine to aisa banaya hai script :/

user_name = input("Enter your name: ")
print(user_name[::-1])

clashwithbat
Автор

user_name=input("enter the user name ")
print("reverse of your name is "+user_name[-1::-1])
print(f"reverse of your name is {user_name[-1::-1]}")
output will come
enter the user name rohit
reverse of your name is tihor
reverse of your name is tihor

AmitKumar-iknq
Автор

#you also do this
name=input("enter your name : ")
print(f"your reverse name is {name[::-1]}")

dart
Автор

This is much simple to understand
name=input("name")
print(name[len(name):0:-1])

adityajain
Автор

input1=input("enter your name? " )
print("your reverse name is " + input1[::-1])

without using string formatting and having right answer.

abdurrehman
Автор

name = input("Please enter your name: ")
print("Reverse order is: " + name[::-1])

asimmcp
Автор

username = input("Enter your name ")
print("inverse of your name is "+ username[-1::-1])
Can this also be considered as the correct solution as the output is correct?

AnindyaBhattacharya-yqmt
Автор

name = input("enter your name:")
print(name[::-1])
ye sahi hai kya sir

pawangaikwad
Автор

name=input("enter you name : ') print(f"reverse of your name is {name [-1: : -1] })

livelifeleusurely
Автор

name= input ("enter you name : ")
print(f"reverse name is : {name[::-1]}")

TopTutorial
Автор

Bhiya phython me gamming ke liye kiya alag course hota hyy plz answers do na

ayanhaldar
Автор

print("your reverse name is " + name[::-1]), this is also correct

zafarali-fenv
Автор

a="What is your name?"
print(input(a)[::-1]) also works

rehanmallick
Автор

name = "rakeshbishnoi"
print(f"reverse of your name is {name[::-1]}")
print(f"reverse of your name is {name[-1::-1]}")
print("reverse of your name is " + name[::-1])
ans is same like ionhsibhsekar

rawquesh
visit shbcf.ru