write a program to check whether the entered age of a person is > = 18 or not, if age > = 18 display a message "you are eligible to vote"
Answers
Answered by
0
Answer:
# getting input
age = int(input("Enter your age: "))
.
# if-else statement
if (age > 18):
print("Eligible to Vote")
else:
print("Not eligible to vote"
its in python bcoz u haven't told in which language I have to write to program
Answered by
1
Answer:
# Python program to print voting eligibility for a person:
age = int(input("Enter your age: "))
if age <= 18:
print ("you are eligible to vote")
else:
print ("You are not eligible to vote")
----------------
Output:
Enter your age: 18
you are eligible to vote
PLS SEE THE ATTACHMENT FOR THE CODING IN "PyCharm"
Attachments:
Anonymous:
Extraordinary Answer!!! Only a few people are so serious about the answers...
Similar questions