cs/Practical File/questions/question_15.py
Neil Revin 780baf678e
chore: move question & output files
Move python question files to 'questions' directory
Move output files to 'outputs' directory
Copy output files to 'questions' for ease of viewing

Signed-off-by: Neil <neil@willofsteel.me>
2025-06-24 02:34:07 +05:30

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)