you need markup to make the indent show:
anway, lets say the string we want to reverse is
"hello", then the length of hello is 5, make sense? however, indexes are zero index bases (counting start at zero) so if you have a length of 5, the indexes are: 0, 1, 2, 3, 4.
so when you try to do:
you have a problem, there is no index 5.
You are experiencing this problem. because here you get the length:
number = len(text)
and then here:
you can't, because of this zero based indexes