13 lines
339 B
Python
13 lines
339 B
Python
# Question: Write a Python program to accept age and check whether the person is eligible to vote (18 or older).
|
|
|
|
def main(age: int) -> None:
|
|
if age >= 18:
|
|
print(f"Age {age} is eligible to vote.")
|
|
else:
|
|
print(f"Age {age} is not eligible to vote.")
|
|
|
|
if __name__ == '__main__':
|
|
main(18)
|
|
main(17)
|
|
main(20)
|