In this python if else program, we will check whether the given citizen is a senior citizen or not depending on the age.
Condition:
If the age is greater than 60 then the person is a Senior Citizen.
Steps to solve the program
- Take the age of a citizen as input through the user.
- Using an if-else statement determine whether the citizen is a senior citizen or not.
- If the age is greater than 60 then only the citizen is a senior citizen.
- Print the output.
age = int(input("Enter age of a citizen: "))
if age > 60:
print("The given citizen is a senior citizen")
else:
print("The given citizen is not a senior citizen")
Output :
Enter age of a citizen: 70
The given citizen is a senior citizen