diff --git a/conditions.py b/conditions.py index 1499e63..f560a2a 100644 --- a/conditions.py +++ b/conditions.py @@ -9,3 +9,13 @@ # - Prompts a user to enter their age. # - Uses a conditional statement to check if the age is greater than or equal to 18. # - Prints "You are eligible to vote" if true, otherwise "You are not eligible to vote." +# Prompt the user to enter their age +age = int(input("Enter your age: ")) + +# Check if the age is greater than or equal to 18 using conditional statements +if age >= 18: + print("You are eligible to vote.") +else: + print("You are not eligible to vote.") + +