Sunday, July 14, 2019

WAP to input the name and age of a person and display “CHILD”,“TEENAGER” or "ADULT" according to the age.

age = int(input("Enter age = "))
print('-'*20)
if (age >= 1  and age <= 12 ):
print(str(age) + " is a CHILD ")
elif(age >=13 and age <=19 ):
print(str(age) + " is a TEENAGER")
else:
print(str(age) + " is a ADULT")

No comments:

Post a Comment