The following is my code, I want to ask a number to work on, check if it is digit before asking for another options, and if is another valid digit, break while loop.
I understand that I could ask two question before using and operand to join the two condition in one if. But surprisingly my python program ALWAYS hang (not responding) while I run, with the following code. I try troubleshooting and realise it's having another raw_input in the if loop, anyone facing the same problem ? Or is there something that I missed out ?
while True:
testNo = raw_input("Enter the number you want to test:")
if testNo.isdigit() == True:
testOp = raw_input("Choose your option:1 - double, 2 - square, 3 - cube:")
if testOp > 0 and testOp <= 3:
break
else:
continue
else:
continue