Skip to content

Commit 2a72d98

Browse files
authored
Add files via upload
1 parent 8d5074d commit 2a72d98

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

voting.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Prompt the user to enter their age
2+
age = int(input("Enter your age: "))
3+
4+
# Check for voting eligibility using an if-else statement
5+
if age >= 18:
6+
print("You are eligible to vote.")
7+
else:
8+
print("You are not eligible to vote.")

0 commit comments

Comments
 (0)