Essentially I need this code I've written in JES to keep asking the user regardless of how many times and what combination (which is clearly an issue at the moment) and only exit if the number entered is between 0 and 9. At the moment if I enter -3 and then enter 50 it exits. I'm not sure whether I'm close or very far off.
Cheers.
def main()
userInput = requestInteger("Enter a number between 0 and 9...")
while userInput < int(0) :
printNow("Error! Inputs must be between 0 and 9. Please re-enter...")
userInput = requestInteger("Enter a number between 0 and 9...")
while userInput > 9:
printNow("Error! Inputs must be between 0 and 9. Please re-enter...")
userInput = requestInteger("Enter a number between 0 and 9...")
print "Thanks, you have entered: ",userInput,
:after the function name. Please make sure you paste your original code :)