write a Q-Basic program to print the message "NOT ELIGIBLE TO VOTE "if the age is less than 18 .Else print Eligible to vote if the age is greater than 18.
Answers
Answered by
1
IAM WRITING THIS IN PYTHON !
ANSWER :
a = int(input("Your age: "))
if a>18:
print ("YOU ARE ELIGIBLE FOR VOTING")
else:
print("YOU ARE NOT ELIGIBLE FOR VOTING")
STEP BY STEP EXPLANATION :
1st line : a = int(input("Your age: "))
We have created a variable and give an input for only integer and which asks " Your Age"
2nd line : if a>18:
print ("YOU ARE ELIGIBLE FOR VOTING")
it is given that if a is greater than 18 it will print "YOU ARE ELIGIBLE FOR VOTING"
3rd line : else:
else: print("YOU ARE NOT ELIGIBLE FOR VOTING")
it is given that if a is less than 8 in it will print "YOU ARE NOT ELIGIBLE FOR VOTING"
Mark This As BRAINLIEST ANSWER
Similar questions