From 60ee4d78afa34f4c9867bc58df515a77d8968ecc Mon Sep 17 00:00:00 2001 From: Srihari-tech2dive Date: Fri, 6 Dec 2024 12:21:17 +0200 Subject: [PATCH] Update easy_q1.py changed operation and print statement --- problems/easy/easy_q1.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/problems/easy/easy_q1.py b/problems/easy/easy_q1.py index 7bc166e..3660ade 100644 --- a/problems/easy/easy_q1.py +++ b/problems/easy/easy_q1.py @@ -2,22 +2,15 @@ num = int(input("Enter a number: ")) - -if num % 2 != 0: - print("{0} is odd".format(num)) -else: - print("{0} is even".format(num)) - + if (num % 2) == 0: print("{0} is Even".format(num)) else: print("{0} is Odd".format(num)) - -if (num % 2) != 0: - print("{0} is odd".format(num)) -else: - print("{0} is odd".format(num)) + + +