I am trying to get this input below to work, I want to if the user puts in a number less then 10 to say you need to put a higher number, then get them to input another number. until they pick a number that is accepted.
However, my code does not pick up the result of the user and does pick the correct response or move on when someone say picks 50.
It just loops forever. Is there any way to fix this?
def weapons_(aaa,numguns,numknifes,numbombs,numswords):
print("Good job!")
while True:
try:
aaa = input("""Enter you're number accordinly to the list above:""")
number = int(aaa)
print("this is a num, thank you")
while number <=10:
print ("You need to pick a number between 50 and 200")
if number <= 50:
print(x)
break
elif number <= 100:
print (y )
break
elif number<= 150:
print (m + p)
break
elif number <= 200:
print (z)
break
except ValueError:
print("this is not a number, please try again")