max = 30
name= input("what is your name")
print("hello " + name)
age = int(input("how old are you"))
if age >= min and age <= max :
print("you just earned yourself a free holiday!")
elif age < min:
if min - age == 1:
print("sorry " + name + " you are not old enough, please come back in {0} year.".format(min - age) )
else:
print("sorry " + name + " you are not old enough, please come back in {0} years.".format(min - age) )
else:
print("too old ")```
the following lines are so if someone has to wait 1 year the program should print "come back in 1 year" not "come back in 1 years":
print("sorry " + name + " you are not old enough, please come back in {0} year.".format(min - age) )
else:
print("sorry " + name + " you are not old enough, please come back in {0} years.".format(min - age) )**
so i was just wondering if there was a simpler way to do this without adding another if statement.