Answer to Question #270863 in Algorithms for Bjoy

Question #270863

Create an algorithm that will able to read the age of an individual and determine if it qualified to vote or not. The qualifying age to vote is 18 and above. If the age is 18 below, display "too young!". Note that there is no such age as 0 or negative however display "Invalid age" if age is above 100 display "Out of range".

1
Expert's answer
2021-11-24T13:48:35-0500
age=input("Input your age")
if age <= 0
print("Invalid age")
if 0 < age < 18
print("Too young!")
if age > 100
print("Out of range")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS