Reverse the string (String)
Write a function that receives a string (String) as input and reversed it
Example
Write a function that receives a string (String) as input and reversed it
Example
a=input("enter your string:") b=a[::-1] print(b)
a=input("enter the str": ) Print(a[::-1])
X=(input("x: ")) def txttt(): TXT=X[::-1] print(TXT) txttt()
user=input("Enter ant word you want: ) print(user.reversed())
def reverse(str): reverse_str = str[::-1] return reverse_str string = input("enter your text: ") print(reverse(string))
def reverse(text): return reversed(text) char = (input('number : ')) print(*reverse(char))
class Words: def __init__(self, word): self.word = word def print_word(self): return self.word[::-1] word = input("enter your word: ") obj = Words(word) print("کلمه برعکس:", obj.print_word())
def reverse(string): return string[::-1] # Examples print(reverse('amir')) # rima print(reverse('hello')) # olleh
string = input("please enter a string: ") print(string[: : -1])
while True: string = input("enter your str:") if string == "0": print("end") break x = string[::-1] print(x)
Submitting answers is currently unavailable.
Write a function that receives two numbers with one operator (+ - / *) and performs the relevant calculation and returns the result example: CAL (2, '+', 6) #8 CAL (5, ' -', 1 ) #4 CAL (6, '/', 2) #3 CAL (8, '*', 2) #16
Write a function that receives the number of hours of employee work per month as a parameter and calculates the amount of employee salaries according to the formula below and returns each employee for 2 hours of work per month, per hour at 4 ...
Write a function that receives a string and converts Persian numbers into English numbers
Create a table and include the following people including name, city and age.
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نام If you don’t understand the exercise or can’t solve it for any reason, that’s completely
normal—don’t worry 😊
Try checking out easier exercises and reviewing different answers
submitted by others. Gradually, you can move on to more challenging exercises. Also, your answer
might be correct even if it’s different from others.