Extra terrestrials python code coach | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Extra terrestrials python code coach

Does anybody have a python solution for the extraterrestrials code coach challenge

25th Dec 2019, 6:49 AM
David Epstein
David Epstein - avatar
10 Answers
+ 2
The solution to the problem is to reverse the string. So, we can do this once we have the input which we'll call message: print(message[::-1]) This uses Python's slice functions to loop through the string from the end to the beginning, by a step of one.
25th Dec 2019, 3:25 PM
Jianmin Chen
Jianmin Chen - avatar
+ 2
David Epstein I know it did not work out, but you have to share you attempt here. Post your code so we can help you fix it.
25th Dec 2019, 3:44 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 2
Here you go. Done in Python. word = input() word2 = [] def alientalk(x): for i in range(1,len(x)+1): word2.append(x[-i]) print(x[-i]) alientalk(word)
21st Apr 2021, 10:35 AM
Joe Hutchens
Joe Hutchens - avatar
+ 1
Your attempt ?
25th Dec 2019, 6:50 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 1
lets just say it didn’t work out
25th Dec 2019, 7:08 AM
David Epstein
David Epstein - avatar
+ 1
word=input('') print(word[::-1]) This is the answer
27th May 2020, 12:18 PM
DEVENDIRAN G
DEVENDIRAN G - avatar
+ 1
TXH thanks
22nd Dec 2021, 3:13 PM
Anasxon
Anasxon - avatar
+ 1
word =input() alien="" for i in range(len(word),0,-1): print(word[i-1]) alien=alien+word[i-1] print(alien)
24th Jan 2022, 2:23 AM
Gareth Vaughan
Gareth Vaughan - avatar
+ 1
Insertstr="garbage" print(insertstr[-1::-1]) It'll give egabrag as output
1st Mar 2024, 5:23 PM
Lei Wei
Lei Wei - avatar
0
My attempt (beginner's) Word="garbage" Print"egabrag" Then: Word="bathroom" Print "moorhtab" I know it's wrong. Any support is appreciated 🙏
18th Apr 2020, 1:55 PM
Charity buachie
Charity buachie - avatar