Should the output be in inverted commas?


#1



https://www.codecademy.com/en/courses/python-beginner-en-KAgt5/4/3?curriculum_id=4f89dab3d788890003000096#


Oops, try again. Your message doesn't look quite right; instead of "!egassem terces eht ma I", it should be "I am the secret message!"


what should be the output???
I am the secret message!
OR
"I am the secret message!"


garbled = "!XeXgXaXsXsXeXmX XtXeXrXcXeXsX XeXhXtX XmXaX XI"
message = garbled[::2]
print (message[::-1])


#2

the message variable should contain the right message, in your case, you are still manipulating while printing, print message should give the right output


#3

Thanks stetim94 it worked, but the output remained the same


#4

can i see an updated version of your code?


#5

garbled = "!XeXgXaXsXsXeXmX XtXeXrXcXeXsX XeXhXtX XmXaX XI"
message = garbled[::2]
message= message[::-1]
print message


#6

your code no outputs:

I am the secret message!

Which is as it should be, and you should get an approval of the exercise? If not, refresh the page


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.