From c56e3dc9b4c88905bc95aec47b2841ed10da28fe Mon Sep 17 00:00:00 2001 From: GraceTitus <133824320+GraceTitus@users.noreply.github.com> Date: Tue, 19 Mar 2024 22:22:47 +0300 Subject: [PATCH 1/2] Update conditions.py --- conditions.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/conditions.py b/conditions.py index 1499e63..9de4959 100644 --- a/conditions.py +++ b/conditions.py @@ -9,3 +9,11 @@ # - 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.") From 4a579815cfefca418c31b1db3514232d47549016 Mon Sep 17 00:00:00 2001 From: GraceTitus <133824320+GraceTitus@users.noreply.github.com> Date: Tue, 19 Mar 2024 22:27:00 +0300 Subject: [PATCH 2/2] Update conditions.py --- conditions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conditions.py b/conditions.py index 9de4959..f560a2a 100644 --- a/conditions.py +++ b/conditions.py @@ -17,3 +17,5 @@ print("You are eligible to vote.") else: print("You are not eligible to vote.") + +