diff --git a/problems/easy/easy_q2.py b/problems/easy/easy_q2.py index 8c49830..ec4d7b3 100644 --- a/problems/easy/easy_q2.py +++ b/problems/easy/easy_q2.py @@ -1,11 +1,11 @@ # Find the Largest Number: Accept two numbers and print the larger one. def largest_of_two(a, b): if a > b: - return b + return a else: - return a + return b if __name__ == "__main__": num1 = int(input("Enter the First Number :")) num2 = int(input("Enter the Second Number :")) - res = largest_of_two(num1,num1) + res = largest_of_two(num1,num2) print(res) \ No newline at end of file diff --git a/problems/easy/easy_q3.py b/problems/easy/easy_q3.py index 8df3340..e867acb 100644 --- a/problems/easy/easy_q3.py +++ b/problems/easy/easy_q3.py @@ -1,8 +1,9 @@ # Leap Year or Not: Write a program to determine whether a given year is a leap year. def is_leap_year(year): if year % 4 == 0 and year % 100 != 0 or year % 400 == 0: - return "Not a Leap Year" - return "Leap Year" + return " Leap Year" + else: + return "not a Leap Year" if __name__ == "__main__": num = int(input("Enter the number :")) diff --git a/problems/easy/easy_q5.py b/problems/easy/easy_q5.py index fbfab0b..9c7b371 100644 --- a/problems/easy/easy_q5.py +++ b/problems/easy/easy_q5.py @@ -2,13 +2,13 @@ def grade_system(marks): if marks >= 90: - return "B" + return "A" elif marks >= 80: - return "A" + return "B" elif marks >= 70: - return "F" + return "C" else: - return "C" + return "F" if __name__ == "__main__": num = input("Enter the Mark : ")