Practice Makes Perfect 7/15 Why do I get an error?


My code does what it is supposed to do, but Im getting an error from Codecademy saying:

Did you create a function called reverse? Your code threw a “global name ‘reverse’ is not defined” error.

Any idea why?

My code:

def word(text):
letters = “”
for letter in range(len(text) - 1, -1, - 1):
x = letter
letters += text[x]
return letters
print word(“abcd”)


you didn’t name your function reverse.


Oh Jesus haha, thank you :smiley:


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