Python Practice › If-Else Programs › Program 60
Senior citizen check
Write a Python program to check whether a person is a senior citizen (age greater than 60).
Input
70, 45
Output
70 -> senior citizen 45 -> not a senior citizen
Approach
- Compare the age with 60.
Solution
for age in [70, 45]: if age > 60: print(age, "-> senior citizen") else: print(age, "-> not a senior citizen")Output
70 -> senior citizen 45 -> not a senior citizen
Learn the concept
New to this topic? Read the lesson, then come back.