This code does print out "Python!" in reverse. Codecademy doesn't seem to thing so though.....

def reverse(text):
    string = str(text)
    count = 1
    for letter in string:
        if count <= len(string):
            print string[len(string)-count],
            count += 1
print reverse('Python!')

Any suggestions??

7. Reverse

You should return the result , not print it

try this:

def reverse(text):
    result = ""
    index = len(text) - 1
    while(index >= 0):
        result += text[index]
        index -= 1
    return result


it needs the capital P aswell


The exercise wants you to return the reversed string, you don't meet this requirement. Make a string in which you store the reversed result so you can return it after the reversion is done


Thanks guys! I figured it out.