From 47cf47bb98e6e41fa0f4fb970bc3d1a4261c1e22 Mon Sep 17 00:00:00 2001 From: MUKILVELAN007 Date: Fri, 6 Dec 2024 13:42:22 +0530 Subject: [PATCH 01/19] resolving leap prob --- problems/easy/easy_q3.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/problems/easy/easy_q3.py b/problems/easy/easy_q3.py index 8df3340..953e617 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" + if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0): + return "Leap Year" + else: + return "Not a Leap Year" if __name__ == "__main__": num = int(input("Enter the number :")) From fec59e8e8e4936818d6f310e0c43c3734a456694 Mon Sep 17 00:00:00 2001 From: MUKILVELAN007 Date: Fri, 6 Dec 2024 13:51:27 +0530 Subject: [PATCH 02/19] resolving largest num --- problems/easy/easy_q2.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 From 2a1a7618fbbdb412c60b45aca3e348c77c71843d Mon Sep 17 00:00:00 2001 From: MUKILVELAN007 Date: Fri, 6 Dec 2024 13:57:51 +0530 Subject: [PATCH 03/19] resolving add or even --- problems/easy/easy_q1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/problems/easy/easy_q1.py b/problems/easy/easy_q1.py index 546c19b..50fa9f4 100644 --- a/problems/easy/easy_q1.py +++ b/problems/easy/easy_q1.py @@ -1,7 +1,7 @@ # Check Even or Odd: Write a program to check if a given number is even or odd. num = int(input("Enter a number: ")) -if (num / 2) != 0: +if (num % 2) != 0: print("{0} is Odd".format(num)) else: print("{0} is Even".format(num)) From 97111f4f68fc90133833300312a80e84684a6916 Mon Sep 17 00:00:00 2001 From: MUKILVELAN007 Date: Fri, 6 Dec 2024 14:05:02 +0530 Subject: [PATCH 04/19] check whether the given number is positive,negetive,or zero --- problems/easy/easy_q4.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/problems/easy/easy_q4.py b/problems/easy/easy_q4.py index 8b1dc9d..f0489f7 100644 --- a/problems/easy/easy_q4.py +++ b/problems/easy/easy_q4.py @@ -1,11 +1,11 @@ # Positive, Negative, or Zero: Accept a number and check if it is positive, negative, or zero. def check_number(num): if num > 0: - print("Negative") + print("positive") elif num < 0: - print("Positive") + print("negetive") else: - print("Number is negative") + print("zero") if __name__ == "__main__": num = input("Enter the Number : ") From f055646e92b1095581842f4d6f13d79d6b69e0c9 Mon Sep 17 00:00:00 2001 From: MUKILVELAN007 Date: Fri, 6 Dec 2024 14:20:00 +0530 Subject: [PATCH 05/19] Grading system --- problems/easy/easy_q5.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/problems/easy/easy_q5.py b/problems/easy/easy_q5.py index fbfab0b..448e6b2 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" - elif marks >= 80: - return "A" - elif marks >= 70: - return "F" + return "A" + elif marks >= 80 and marks<90: + return "B" + elif marks >= 70 and marks<80: + return "C" else: - return "C" + return "F" if __name__ == "__main__": num = input("Enter the Mark : ") From a26bff32f0e2e6750c45b688c05382532594a024 Mon Sep 17 00:00:00 2001 From: MUKILVELAN007 Date: Fri, 6 Dec 2024 14:39:15 +0530 Subject: [PATCH 06/19] Grading system --- problems/easy/easy_q5.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/problems/easy/easy_q5.py b/problems/easy/easy_q5.py index 448e6b2..486e8f1 100644 --- a/problems/easy/easy_q5.py +++ b/problems/easy/easy_q5.py @@ -3,15 +3,15 @@ def grade_system(marks): if marks >= 90: return "A" - elif marks >= 80 and marks<90: + elif marks >= 80: return "B" - elif marks >= 70 and marks<80: + elif marks >= 70: return "C" else: return "F" if __name__ == "__main__": - num = input("Enter the Mark : ") - res = grade_system(num) + mark = int(input("Enter the Mark : ")) + res = grade_system(mark) print(res) From e5466f6e52c2b36b420c8db873910df031a6c9a3 Mon Sep 17 00:00:00 2001 From: MUKILVELAN007 Date: Fri, 6 Dec 2024 14:40:57 +0530 Subject: [PATCH 07/19] Numbers from 1 to n --- problems/easy/easy_q6.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/problems/easy/easy_q6.py b/problems/easy/easy_q6.py index 3ac65c7..1b137fc 100644 --- a/problems/easy/easy_q6.py +++ b/problems/easy/easy_q6.py @@ -3,7 +3,7 @@ def print_numbers(n): i = 1 while i <= n: print(i) - n -= 1 + i+= 1 if __name__ == "__main__": num = int(input("Enter the Number ")) From af798e9d46ed07b5295263b036348b636ac5b40e Mon Sep 17 00:00:00 2001 From: MUKILVELAN007 Date: Fri, 6 Dec 2024 15:18:38 +0530 Subject: [PATCH 08/19] sum of digits --- problems/easy/easy_q7.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/problems/easy/easy_q7.py b/problems/easy/easy_q7.py index 8efa72e..0ed3395 100644 --- a/problems/easy/easy_q7.py +++ b/problems/easy/easy_q7.py @@ -1,12 +1,12 @@ # Sum of Digits: Write a program to calculate the sum of digits of a number using a while loop. -def sum_of_digits(num): +def sum_of_digits(num): total = 0 while num > 0: total += num % 10 - num = num + 10 + num = num // 10 return total if __name__ == "__main__": num = int(input("Enter the Number : ")) - + print(sum_of_digits(num)) From cc1d2fe65131ca78038c23e120c682fdb305d567 Mon Sep 17 00:00:00 2001 From: MUKILVELAN007 Date: Fri, 6 Dec 2024 16:06:41 +0530 Subject: [PATCH 09/19] mathemeticl operation --- problems/medium/m1.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/problems/medium/m1.py b/problems/medium/m1.py index dddb03c..cc67a80 100644 --- a/problems/medium/m1.py +++ b/problems/medium/m1.py @@ -10,7 +10,8 @@ def math_operations_menu(): print("5. Modulo") choice = int(input("Enter your choice: ")) - a, b = map(int, input("Enter two numbers: ").split()) + a=int(input("Enter a num1:")) + b=int(input("Enter a num2:")) if choice == 1: print("Subtraction:", a - b) @@ -24,3 +25,4 @@ def math_operations_menu(): print("Modulo:", a // b) else: print("Invalid option") +math_operations_menu() From 78c0bf25a935f8a1c1bdc131ee0892abcfce1a6d Mon Sep 17 00:00:00 2001 From: Dharshini-457 Date: Sun, 8 Dec 2024 09:43:32 +0530 Subject: [PATCH 10/19] Easy programs debuging --- FunProjects/subStr.py | 4 ++-- problems/easy/easy_q5.py | 6 +++--- problems/easy/easy_q6.py | 2 +- problems/easy/easy_q7.py | 5 +++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/FunProjects/subStr.py b/FunProjects/subStr.py index 02ae3af..64f1cd8 100644 --- a/FunProjects/subStr.py +++ b/FunProjects/subStr.py @@ -20,12 +20,12 @@ def test_1(string =""): for char in string: - for i in range(initial, len(string)): + for i in range(initial, len(string)+1): substring+= string[i] if substring.count(string[i])>=1: - testList.append(substring[:1-]) + testList.append(substring[:-1]) initial+= 1 substring = "" break diff --git a/problems/easy/easy_q5.py b/problems/easy/easy_q5.py index fbfab0b..2113e96 100644 --- a/problems/easy/easy_q5.py +++ b/problems/easy/easy_q5.py @@ -2,16 +2,16 @@ def grade_system(marks): if marks >= 90: - return "B" + return "A" elif marks >= 80: - return "A" + return "B" elif marks >= 70: return "F" else: return "C" if __name__ == "__main__": - num = input("Enter the Mark : ") + num = int(input("Enter the Mark : ")) res = grade_system(num) print(res) diff --git a/problems/easy/easy_q6.py b/problems/easy/easy_q6.py index 3ac65c7..0d71bc2 100644 --- a/problems/easy/easy_q6.py +++ b/problems/easy/easy_q6.py @@ -3,7 +3,7 @@ def print_numbers(n): i = 1 while i <= n: print(i) - n -= 1 + i += 1 if __name__ == "__main__": num = int(input("Enter the Number ")) diff --git a/problems/easy/easy_q7.py b/problems/easy/easy_q7.py index 8efa72e..98debb2 100644 --- a/problems/easy/easy_q7.py +++ b/problems/easy/easy_q7.py @@ -3,10 +3,11 @@ def sum_of_digits(num): total = 0 while num > 0: total += num % 10 - num = num + 10 + num = num // 10 + print(total) return total if __name__ == "__main__": num = int(input("Enter the Number : ")) - + sum_of_digits(num) From babf7ecf3fd2ad552e9f96fe139807782dc7a89b Mon Sep 17 00:00:00 2001 From: Dharshini-457 Date: Sun, 8 Dec 2024 10:03:08 +0530 Subject: [PATCH 11/19] Easy programs are Debuged --- problems/easy/easy_q4.py | 12 ++++++------ problems/easy/easy_q5.py | 4 ++-- problems/easy/easy_q6.py | 4 ++-- problems/easy/easy_q7.py | 4 ++-- problems/easy/easy_q8.py | 2 +- problems/easy/easy_q9.py | 13 +++++++------ 6 files changed, 20 insertions(+), 19 deletions(-) diff --git a/problems/easy/easy_q4.py b/problems/easy/easy_q4.py index 8b1dc9d..190e2d9 100644 --- a/problems/easy/easy_q4.py +++ b/problems/easy/easy_q4.py @@ -1,16 +1,16 @@ # Positive, Negative, or Zero: Accept a number and check if it is positive, negative, or zero. def check_number(num): - if num > 0: + if num < 0: print("Negative") - elif num < 0: + elif num > 0: print("Positive") else: - print("Number is negative") + print("Number is zero") if __name__ == "__main__": - num = input("Enter the Number : ") - res = check_number(num) - print(res) + num = int(input("Enter the Number : ")) + check_number(num) + diff --git a/problems/easy/easy_q5.py b/problems/easy/easy_q5.py index 2113e96..fd37230 100644 --- a/problems/easy/easy_q5.py +++ b/problems/easy/easy_q5.py @@ -12,6 +12,6 @@ def grade_system(marks): if __name__ == "__main__": num = int(input("Enter the Mark : ")) - res = grade_system(num) - print(res) + result = grade_system(num) + print(result) diff --git a/problems/easy/easy_q6.py b/problems/easy/easy_q6.py index 0d71bc2..90b3216 100644 --- a/problems/easy/easy_q6.py +++ b/problems/easy/easy_q6.py @@ -7,5 +7,5 @@ def print_numbers(n): if __name__ == "__main__": num = int(input("Enter the Number ")) - res = print_numbers(num) - print(res) + result = print_numbers(num) + print(result) diff --git a/problems/easy/easy_q7.py b/problems/easy/easy_q7.py index 98debb2..584bc46 100644 --- a/problems/easy/easy_q7.py +++ b/problems/easy/easy_q7.py @@ -8,6 +8,6 @@ def sum_of_digits(num): return total if __name__ == "__main__": - num = int(input("Enter the Number : ")) - sum_of_digits(num) + no = int(input("Enter the Number : ")) + sum_of_digits(no) diff --git a/problems/easy/easy_q8.py b/problems/easy/easy_q8.py index 794332a..33d8b86 100644 --- a/problems/easy/easy_q8.py +++ b/problems/easy/easy_q8.py @@ -5,7 +5,7 @@ def reverse_number(num): digit = num % 10 rev = rev + digit num //= 10 - return num + return rev if __name__ == "__main__": num = int(input("Enter num : ")) res = reverse_number(num) diff --git a/problems/easy/easy_q9.py b/problems/easy/easy_q9.py index 96af443..1a8741a 100644 --- a/problems/easy/easy_q9.py +++ b/problems/easy/easy_q9.py @@ -1,13 +1,14 @@ # Factorial of a Number: Write a program to calculate the factorial of a given number using a while loop. -def factorial(n): +def factorial(num): result = 1 - while n > 0: - result *= n - n += 1 + for n in range(1,num+1): + result=result * n + n += 1 + return result if __name__ == "__main__": num = int(input("Enter the Number :")) - factorial(num*7) - print(num) + res = factorial(num) + print(f"Factotial of {num} ",res) From 4027719f2e146a20e47750d7ddbfe5dad3ce016a Mon Sep 17 00:00:00 2001 From: Dharshini-457 Date: Sun, 8 Dec 2024 10:15:43 +0530 Subject: [PATCH 12/19] Factorial --- problems/easy/easy_q9.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/problems/easy/easy_q9.py b/problems/easy/easy_q9.py index 6392f41..e4c65c3 100644 --- a/problems/easy/easy_q9.py +++ b/problems/easy/easy_q9.py @@ -1,18 +1,15 @@ # Factorial of a Number: Write a program to calculate the factorial of a given number using a while loop. def factorial(num): result = 1 - while n > 0: + for n in range(1,num+1): result *= n n += 1 return result if __name__ == "__main__": - n= int(input("Enter the Number :")) - print(factorial(n)) + num= int(input("Enter the Number :")) + print(f"Factorial of the number {num} is ",factorial(num)) - num = int(input("Enter the Number :")) - factorial(num*7) - print(num) From 13489a13fd88e3be1759dd9a0a247ab18c9af4f5 Mon Sep 17 00:00:00 2001 From: Dharshini-457 Date: Sun, 8 Dec 2024 10:33:28 +0530 Subject: [PATCH 13/19] Calculator --- problems/easy/easy_q12.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/problems/easy/easy_q12.py b/problems/easy/easy_q12.py index c762cae..3e2f43b 100644 --- a/problems/easy/easy_q12.py +++ b/problems/easy/easy_q12.py @@ -15,9 +15,4 @@ def calculator(a, b, operator): result = calculator(n1,n2,opr) print(result) - - print(result) - - - print(result) \ No newline at end of file From 6ebd4bfa14aed3ffe806b8ae8dcf448b398c5195 Mon Sep 17 00:00:00 2001 From: Dharshini-457 Date: Sun, 8 Dec 2024 10:39:25 +0530 Subject: [PATCH 14/19] Month Name --- problems/easy/easy_q13.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/problems/easy/easy_q13.py b/problems/easy/easy_q13.py index 90d0a0c..01aba3c 100644 --- a/problems/easy/easy_q13.py +++ b/problems/easy/easy_q13.py @@ -14,8 +14,9 @@ def month_name(month): 11: "November", 12: "December" } - return switch[month + 1] + return switch[month] if __name__ == "__main__": - chooseMonthNum = int(input("Enter the Month: ")) - result = month_name(chooseMonthNum) - print(result) \ No newline at end of file + while True: + chooseMonthNum = int(input("Enter the Month: ")) + result = month_name(chooseMonthNum) + print(result) \ No newline at end of file From bcfeb6b169d3fae3e63dea217ee8140961bb29e0 Mon Sep 17 00:00:00 2001 From: Dharshini-457 Date: Sun, 8 Dec 2024 10:44:41 +0530 Subject: [PATCH 15/19] Vowel --- problems/easy/easy_q14.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/problems/easy/easy_q14.py b/problems/easy/easy_q14.py index 10153a9..b802568 100644 --- a/problems/easy/easy_q14.py +++ b/problems/easy/easy_q14.py @@ -9,9 +9,10 @@ def vowel_or_consonant(char): } return switch.get(char.lower(),"Constant") if __name__ == "__main__": - characterInput = input("Enter the charactrer : ") - if len(characterInput)==1: - res = vowel_or_consonant(characterInput) - print(res) - else: - print("Please enter exactly one character.") \ No newline at end of file + while True: + characterInput = input("Enter the charactrer : ") + if len(characterInput)==1: + res = vowel_or_consonant(characterInput) + print(res) + else: + print("Please enter exactly one character.") \ No newline at end of file From 7823ec099878ac8849eccbbd26d6b9cb0eded4af Mon Sep 17 00:00:00 2001 From: Dharshini-457 Date: Sun, 8 Dec 2024 10:46:19 +0530 Subject: [PATCH 16/19] Vowel program commit --- problems/easy/easy_q14.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/problems/easy/easy_q14.py b/problems/easy/easy_q14.py index b802568..bc3a804 100644 --- a/problems/easy/easy_q14.py +++ b/problems/easy/easy_q14.py @@ -12,7 +12,7 @@ def vowel_or_consonant(char): while True: characterInput = input("Enter the charactrer : ") if len(characterInput)==1: - res = vowel_or_consonant(characterInput) - print(res) + result = vowel_or_consonant(characterInput) + print(result) else: print("Please enter exactly one character.") \ No newline at end of file From 12f84cd9dcc85539b7cfdac8fb32b03080b6baea Mon Sep 17 00:00:00 2001 From: Dharshini-457 Date: Sun, 8 Dec 2024 10:51:10 +0530 Subject: [PATCH 17/19] Vowel program Resloved --- problems/easy/easy_q14.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/problems/easy/easy_q14.py b/problems/easy/easy_q14.py index bc3a804..b802568 100644 --- a/problems/easy/easy_q14.py +++ b/problems/easy/easy_q14.py @@ -12,7 +12,7 @@ def vowel_or_consonant(char): while True: characterInput = input("Enter the charactrer : ") if len(characterInput)==1: - result = vowel_or_consonant(characterInput) - print(result) + res = vowel_or_consonant(characterInput) + print(res) else: print("Please enter exactly one character.") \ No newline at end of file From e34026f708cfc86f0021c41379c3386d2b67d679 Mon Sep 17 00:00:00 2001 From: Dharshini-457 Date: Sun, 8 Dec 2024 11:15:24 +0530 Subject: [PATCH 18/19] sum of the array elements commit --- problems/easy/easy_q16.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/problems/easy/easy_q16.py b/problems/easy/easy_q16.py index 16b00c5..eafb50b 100644 --- a/problems/easy/easy_q16.py +++ b/problems/easy/easy_q16.py @@ -3,13 +3,13 @@ def sum_first_last(arr): return arr[0] + arr[-1] if __name__ == "__main__": # Handle the input by Yourself - - arr=[] + arr=[2,5,8,7,6] + n=int(input("Enter the Total number of Elements:")) for i in range(n): x=int(input("Enter the element :")) arr.append(x) - arr=[2,5,8,7,6] - + + print(arr) print(sum_first_last(arr)) \ No newline at end of file From f7323821ee0775d844fd7060647f59c040a14c2e Mon Sep 17 00:00:00 2001 From: Dharshini-457 Date: Sun, 5 Jan 2025 13:39:33 +0530 Subject: [PATCH 19/19] changes --- FunProjects/quiz_main.py | 6 +++--- FunProjects/subStr.py | 2 +- problems/easy/easy_q11.py | 14 +++++++------- problems/easy/easy_q15.py | 4 ++-- problems/easy/easy_q18.py | 6 +++--- problems/medium/abc.txt | 2 ++ problems/medium/m5.py | 1 + 7 files changed, 19 insertions(+), 16 deletions(-) create mode 100644 problems/medium/abc.txt diff --git a/FunProjects/quiz_main.py b/FunProjects/quiz_main.py index 8922f0f..4f39680 100644 --- a/FunProjects/quiz_main.py +++ b/FunProjects/quiz_main.py @@ -20,14 +20,14 @@ def evaluate_question(user_answer, correct_answer, alt_answer, close_answer): elif user_answer == close_answer: return "Close" else: - return True + return False def answer_response(evaluated): if evaluated == True: - return "That's not the correct answer!" + return "Correct! Well done" else: - return "Correct! Well done." + return "That's not the correct answer!." correct_answers = 0 diff --git a/FunProjects/subStr.py b/FunProjects/subStr.py index 64f1cd8..ad2ed1f 100644 --- a/FunProjects/subStr.py +++ b/FunProjects/subStr.py @@ -25,7 +25,7 @@ def test_1(string =""): if substring.count(string[i])>=1: - testList.append(substring[:-1]) + testList.remove(substring[:-1]) initial+= 1 substring = "" break diff --git a/problems/easy/easy_q11.py b/problems/easy/easy_q11.py index 86d704f..3d283fb 100644 --- a/problems/easy/easy_q11.py +++ b/problems/easy/easy_q11.py @@ -9,27 +9,27 @@ def day_of_week(day): 6: "Saturday", 7: "Sunday" } - + if day <=7 : - return switch[8] + return switch[day] else: - print("Error occured") + return "Error occured" if __name__ == "__main__": day = int(input("Enter a number (1-7) to get the day of the week: ")) result = day_of_week(day) print(result) - if day < 1 or day > 7: - return "Invalid day" - return switch[day] +if day < 1 or day > 7: + print( "Invalid day") +print( switch[day]) if __name__ == "__main__": xcd = day_of_week(32) print(xcd) - return switch[day] + print( switch[day] ) if __name__ == "__main__": day=int(input("Enter the number : ")) diff --git a/problems/easy/easy_q15.py b/problems/easy/easy_q15.py index 571e027..7a51125 100644 --- a/problems/easy/easy_q15.py +++ b/problems/easy/easy_q15.py @@ -9,7 +9,7 @@ def grade_description(grade): } if g== "A": - PRIN + pass return switch.get(grade, "Not a valid grade") if __name__ == "__main__": rs = grade_description('Z') @@ -17,7 +17,7 @@ def grade_description(grade): g=input("Enter a grade:") grade_description(g) - return switch.get(grade.upper(), "Please enter a valid grade") +return switch.get(grade.upper(), "Please enter a valid grade") if __name__ == "__main__": rs = grade_description('Z') print(rs) diff --git a/problems/easy/easy_q18.py b/problems/easy/easy_q18.py index 8c32a32..aaa3e79 100644 --- a/problems/easy/easy_q18.py +++ b/problems/easy/easy_q18.py @@ -10,13 +10,13 @@ def last_char_of_string(s): last_char_of_string(string) - return s[-1] # Bug: Fetches second-to-last character instead of last +return s[-1] # Bug: Fetches second-to-last character instead of last if __name__ == "__main__": # Handle the input by Yourself s=input("Enter the string:") print(last_char_of_string(s)) - s=[7,8,9,6] - print( last_char_of_string(s)) +s=[7,8,9,6] +print( last_char_of_string(s)) \ No newline at end of file diff --git a/problems/medium/abc.txt b/problems/medium/abc.txt new file mode 100644 index 0000000..5538c28 --- /dev/null +++ b/problems/medium/abc.txt @@ -0,0 +1,2 @@ +HI +HELLO EVERYONE \ No newline at end of file diff --git a/problems/medium/m5.py b/problems/medium/m5.py index 618e1b6..ff78fe7 100644 --- a/problems/medium/m5.py +++ b/problems/medium/m5.py @@ -27,3 +27,4 @@ def matrix_operations_menu(): print("Transpose:", transpose) else: print("Invalid option") +matrix_operations_menu()