Bellow is my code, (By The Way, a ~ equals a space for indentation)
~~~~x = str(x)
~~~~y = len(x)
~~~~~~~~for i in x:
~~~~~~~~y = y-1
x = 'wordy'
The output is:
The code works, not neatly, but it works.
Codecademy Python console is telling me that my function is returning "None" when it should be returning "!nothyP".
But the last bit of output from my code is "!nothyP" when entering
x = "python"
Occasionally I receive the "Hey now! No using [::-1] or reversed()." error message.
But [::-y] isn't the same as [::-1] to me.
Any ideas or suggestions?
I could rewrite a new program, but I prefer to improve my current code.
However, I can start over if I need to.
Thank you for your time and consideration. Happy coding!