diff --git a/problems/easy/easy_q2.py b/problems/easy/easy_q2.py index 5aaf259..c0c0c7c 100644 --- a/problems/easy/easy_q2.py +++ b/problems/easy/easy_q2.py @@ -24,6 +24,9 @@ def largest_of_two(a, b): num2 = int(input("Enter the Second Number :")) res = largest_of_two(num1,num2) + print(res) + + print(res) print(res) @@ -41,4 +44,5 @@ def largest_of_two(a, b): print(res) - \ No newline at end of file + + diff --git a/problems/easy/easy_q3.py b/problems/easy/easy_q3.py index 2b35891..33eded1 100644 --- a/problems/easy/easy_q3.py +++ b/problems/easy/easy_q3.py @@ -10,6 +10,11 @@ def is_leap_year(year): if year % 4 == 0 and year % 100 != 0 or year % 400 == 0: + return "Leap Year" + else: + return "not a Leap Year" + + return "Leap Year" else: return "Not Leap Year" @@ -29,6 +34,7 @@ def is_leap_year(year): + if __name__ == "__main__": num = int(input("Enter the number :")) diff --git a/problems/easy/easy_q4.py b/problems/easy/easy_q4.py index 39a4399..644a47f 100644 --- a/problems/easy/easy_q4.py +++ b/problems/easy/easy_q4.py @@ -1,5 +1,13 @@ # Positive, Negative, or Zero: Accept a number and check if it is positive, negative, or zero. def check_number(num): + + if num > 0: + print("positive") + elif num < 0: + print("negative") + else: + print("Number is zero") + if num < 0: print("Negative") elif num > 0: @@ -7,6 +15,7 @@ def check_number(num): else: keerthi print("Number is Zero") + if __name__ == "__main__": num = int(input("Enter the Number : "))