I'm writing a basic program which is to create a team based on age groups. So I want to create a team, but for example for the first team they have to be between the age of 20 and 25:
while True:
if(num<20):
num = int(input("Too young, try again!: "))
elif(num>25):
num = int(input("Too old, try again!: "))
I also want to display a message in the if statement if the user enters text rather than an integer, for example:
elif(num is not int):
num = int(input("Please enter integers(numbers)only!: ")
I'm new to Python so sorry if the example is poor.