BRIEF: I am trying to write a simple program that checks if a given code is valid. The code is valid if all the three characters entered are digits between 0 and 9. If the code is valid, your progam displays a message Thank you. We will process your order!. The output of your program should be an error message The verification code was not valid. Please check your credit card code again. if the input is not valid.
ATTEMPT:
lol = raw_input("what's your code?")
rofl=lol.split()
for int in rofl:
if 9>int(rofl)>0:
print "Thank you. We will process your order!"
else:
print 'The verification code was not valid. Please check your credit card code again.'
PURPOSE:
To learn - I found another way to do this involving just checking the whole thing for being under 1000 and over 0, and it worked perfectly. But I'm just trying to learn more.
REQUEST:
That you give me explicit direction on how to fix my code and provide any additional relevant advice.
CLOSE:
Thank you in advance.
lolorrofl, give them meaning, such asuserInput,inputAsArray,...