My first question here, so if I don't do something correctly, please tell me so I can correct it and/or do it correctly next time.
I am trying to allow a user to input ten numbers, then spit them back out in the reverse order they gave them. I can't get the ranges right, though, because it keeps either asking me for just 9 numbers, or it doesn't assign anything to the last variable in my list.
I am using Python 3.x.
Here is my code:
#Creating my list
myNumbers=[1,2,3,4,5,6,7,8,9,10,11]
#Creating a for loop for inputs
for A in range (1,10):
myNumbers[A]=input("Enter a number: ")
#Creating a for loop for outputs
for B in range (10,1,-1):
print(myNumbers[B])
It's only allowing me to input 9 numbers, and then my output is the number 11, then my reverse input.
Any help would be much appreciated.