Need the solution; thanx | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Need the solution; thanx

You meet a group of aliens, and their language is just like English except that they say every word backwards. How will you learn to communicate with them? Task: Take a word in English that you would like to say, and turn it into language that these aliens will understand. Input Format: A string of a word in English. Output Format: A string of the reversed word that represents the original word translated into alien language. Sample Input: howdy Sample Output: ydwoh

5th Oct 2022, 12:44 PM
Am Tad
Am Tad - avatar
5 Answers
+ 8
The task is to revert the string and output it. What have you tried so far? Please 👉TAG THE RELEVANT PROGRAMMING LANGUAGE
5th Oct 2022, 12:51 PM
Lisa
Lisa - avatar
+ 1
A=input() Print (A[::-1])
6th Oct 2022, 6:56 AM
Venkatesh
Venkatesh - avatar
+ 1
Thank you for your answers everyone. Am gonna try it. Lisa it seems I picked a pretty advanced exercise for me. I have not reached the lesson about these signs [ ] and double ::. Thanx.
6th Oct 2022, 9:56 AM
Am Tad
Am Tad - avatar
0
print("howdy"[::-1])
5th Oct 2022, 12:55 PM
SoloProg
SoloProg - avatar
6th Oct 2022, 9:56 AM
Am Tad
Am Tad - avatar