7. reverse


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
I am having issues with 7. reverse.
<In what way does your code behave incorrectly? Include ALL error messages.>
The error message tells me that I am returning “!nohtyP” instead of “!nohtyP”
<What do you expect to happen instead?>
I have no clue what went wrong as the above is not a typo but the error message telling me that my answer is wrong and saying it should be the same exact thing.

```python

def reverse(text):
txet = " "
n = len(text) - 1
while n > -1:
txet += text[n]
n -= 1
return txet

<do not remove the three backticks above>

#2

You need to have a better look at the error message. It says:

Your function fails on reverse(“Python!”). It returns " !nohtyP" when it should return “!nohtyP”.

Notice the space in front of your result. I think you know how to get rid of it, right? :smiley:


#3

Thank you. The background was messing with my eyes.


#4

I have tried to use append in order to create the reverse word but it won’t work…

def reverse(word):
drow =
position = len(word)
for n in range(position -1 , 0):
drow.append(word[n])

return drow

i believe it should have a way to make it this way… keep getting as result…