Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
3a1f71a
Modified easy 01 by harrish
Harrish135 Dec 6, 2024
d8985b5
changed the logical error
Anushriuser Dec 6, 2024
44e02b8
I have changed a simple changes throughout the bugged code
mourishantony Dec 6, 2024
1ac33ef
find the largest number
Kanishkaneya1929 Dec 6, 2024
e8afa42
solved logically
hanishdevaraj007 Dec 6, 2024
feb1d05
changed syntax which is an error before in palindrome
Anushriuser Dec 6, 2024
1927ade
Here there is an mistake in data type input and also the in the if co…
mourishantony Dec 6, 2024
bfcdd9b
here there is the mistakes in input data type and if elif else statem…
mourishantony Dec 6, 2024
4471435
odd or even
Kanishkaneya1929 Dec 6, 2024
05c5a06
here there is an error in increment operater
mourishantony Dec 6, 2024
2415068
fix: m1
VinuKarthick7 Dec 6, 2024
5cf3333
leap year syntax corrected
shridhanya06 Dec 6, 2024
16eb42a
Updated by Harrish
Harrish135 Dec 6, 2024
3293490
takes long time to check area,perimeter of all shapes....but it works
hanishdevaraj007 Dec 6, 2024
329ee60
Merge branch 'main' into harrish-1
Harrish135 Dec 6, 2024
94a24ef
m10 completed with small alterations!!
hanishdevaraj007 Dec 6, 2024
e16167a
Merge branch 'main' of https://github.com/VinuKarthick7/ErrorHunter
VinuKarthick7 Dec 6, 2024
4d2b71c
The number is positive ,Negative, or Zero
Dec 6, 2024
86b9714
Let's play same games without any error....(m10)
hanishdevaraj007 Dec 6, 2024
a4fb037
changes done from code 1 to 3
shridhanya06 Dec 6, 2024
2ef1869
initial commit
Dec 6, 2024
f4c48a2
Update easy_q2.py
Srihari-tech2dive Dec 6, 2024
54ce642
The number N using a While loop
Dec 6, 2024
14ff486
fix: m3
VinuKarthick7 Dec 6, 2024
daa1c0b
Merge pull request #81 from Mathi27/staging-1
Mathi27 Dec 6, 2024
6990b75
I have corrected the errors
mourishantony Dec 6, 2024
9f65da3
m17
zoro1324 Dec 6, 2024
437cb39
Merge branch 'main' into main
Mathi27 Dec 6, 2024
64d075d
Merge pull request #48 from Anushriuser/main
Mathi27 Dec 6, 2024
a58fa2b
i have changed in the value and input
mourishantony Dec 6, 2024
f1e6841
Merge branch 'main' into problem
Mathi27 Dec 6, 2024
a200fdd
Merge pull request #53 from Kishore29012007/problem
Mathi27 Dec 6, 2024
3fcbd08
Merge branch 'main' into patch-1
Mathi27 Dec 6, 2024
efee9ea
Merge pull request #79 from Srihari-tech2dive/patch-1
Mathi27 Dec 6, 2024
8e637ca
here the def function is not called and there is some mistakes in the…
mourishantony Dec 6, 2024
9556d1e
Merge branch 'Mathi27:main' into main
zoro1324 Dec 6, 2024
d88e234
Merge branch 'main' into main
Mathi27 Dec 6, 2024
1eeac4e
Merge pull request #84 from hanishdevaraj007/main
Mathi27 Dec 6, 2024
9dd79c3
fix: m2
VinuKarthick7 Dec 6, 2024
4762b62
made some changes in easy_q4.py
shridhanya06 Dec 6, 2024
fca6379
Merge branch 'main' into harrish-1
Mathi27 Dec 6, 2024
c4973a2
I have corrected the code
mourishantony Dec 6, 2024
20bd076
Merge pull request #59 from Harrish135/harrish-1
Mathi27 Dec 6, 2024
dbf6dc9
Merge pull request #87 from zoro1324/main
Mathi27 Dec 6, 2024
60ee4d7
Update easy_q1.py
Srihari-tech2dive Dec 6, 2024
7c45375
Merge pull request #92 from Srihari-tech2dive/patch-3
Mathi27 Dec 6, 2024
1c77aac
Modified Armstrong Numbers
RaahulKannaK Dec 6, 2024
a4cabc8
Merge branch 'main' into Branch_Shridhanya
Mathi27 Dec 6, 2024
03da989
Merge pull request #91 from shridhanya06/Branch_Shridhanya
Mathi27 Dec 6, 2024
9f309db
changed the arithmetic symbol of '/' to '%'
Sharmily-Veeramani Dec 6, 2024
3ad01b2
Merge pull request #90 from mohamedimthiyas2007/main
Mathi27 Dec 6, 2024
48c09c3
Merge pull request #93 from RaahulKannaK/raahul1
Mathi27 Dec 6, 2024
ac3d5d8
Merge branch 'main' into main
Mathi27 Dec 6, 2024
31f5141
Merge pull request #94 from Sharmily-Veeramani/main
Mathi27 Dec 6, 2024
5d3d46d
Merge branch 'main' into main
Mathi27 Dec 6, 2024
2468339
Merge pull request #89 from VinuKarthick7/main
Mathi27 Dec 6, 2024
69eeff0
Merge branch 'main' into mourish-error-fix
Mathi27 Dec 6, 2024
b11f62a
completed
mourishantony Dec 6, 2024
ad4dfe3
Merge branch 'mourish-error-fix' of https://github.com/mourishantony/…
mourishantony Dec 6, 2024
d58deae
added f format which is not added before
mohamedimthiyas2007 Dec 6, 2024
7ec4cd8
repeat two times of num1
mohamedimthiyas2007 Dec 6, 2024
277f122
in 3rd line code we add logical mistake ! i will remove
mohamedimthiyas2007 Dec 6, 2024
51b8f84
added f format whic 5th and 7th line'
mohamedimthiyas2007 Dec 6, 2024
432d1fe
Merge branch 'main' of https://github.com/mohamedimthiyas2007/ErrorHu…
mohamedimthiyas2007 Dec 6, 2024
76ac5dd
added zero divisional error
mohamedimthiyas2007 Dec 6, 2024
ac11c57
Merge branch 'main' of https://github.com/mohamedimthiyas2007/ErrorHu…
mohamedimthiyas2007 Dec 6, 2024
43b6507
Merge branch 'main' into main
Mathi27 Dec 6, 2024
eb5e991
Completed now
mourishantony Dec 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions problems/easy/easy_q1.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@

num = int(input("Enter a number: "))

if (num % 2) != 0:
print("{0} is Odd".format(num))
else:

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 Even".format(num))





27 changes: 25 additions & 2 deletions problems/easy/easy_q10.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,29 @@ def is_palindrome(num):
original = num

reverse = 0

while True:
reverse = reverse * 10 + num % 10
num //= 10
if num == 0:
break
return reverse == original



while True:
reverse = reverse * 10 + num % 10
num //= 10
if num != 0:
break

while num != 0:
reverse = reverse * 10 + num % 10
num //= 10




return reverse == original

reverse = ''
Expand All @@ -18,9 +37,13 @@ def is_palindrome(num):
else:
return "It is not a Palindrome"


if __name__ == "__main__":
nums = int(input("Enter the Number: "))
res = is_palindrome(nums)
print(res)







25 changes: 22 additions & 3 deletions problems/easy/easy_q11.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Day of the Week: Write a program that takes a number (1-7) and prints the corresponding day of the week using a switch case.
#
def day_of_week(day):
switch = {
1: "Monday",
Expand All @@ -9,6 +9,26 @@ def day_of_week(day):
6: "Saturday",
7: "Sunday"
}

if day <=7 :
return switch[8]
else:
print("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 __name__ == "__main__":
xcd = day_of_week(32)
print(xcd)



return switch[day]
if __name__ == "__main__":

Expand All @@ -25,5 +45,4 @@ def day_of_week(day):
print(xcd)
else:
print("Enter Valid Input")



4 changes: 4 additions & 0 deletions problems/easy/easy_q12.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ def calculator(a, b, operator):
n2 = int(input("Enter the Number 2 :"))
opr = input("Enter the Operator :")
result = calculator(n1,n2,opr)

print(result)

print(result)


print(result)

4 changes: 2 additions & 2 deletions problems/easy/easy_q13.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ def month_name(month):
}
return switch[month + 1]
if __name__ == "__main__":
chooseMonthNum = float(input("Enter the Month: "))
chooseMonthNum = int(input("Enter the Month: "))
result = month_name(chooseMonthNum)
print(result)
print(result)
11 changes: 7 additions & 4 deletions problems/easy/easy_q14.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ def vowel_or_consonant(char):
'o': "Vowel",
'u': "Vowel",
}
return switch.get(char, "Vowel")
return switch.get(char.lower(),"Constant")
if __name__ == "__main__":
characterInput = int(input("Enter the charactrer : "))
res = vowel_or_consonant(characterInput)
print(res)
characterInput = input("Enter the charactrer : ")
if len(characterInput)==1:
res = vowel_or_consonant(characterInput)
print(res)
else:
print("Please enter exactly one character.")
11 changes: 6 additions & 5 deletions problems/easy/easy_q15.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Grade Description: Write a program that accepts a grade (A, B, C, D, F) and prints its description (e.g., A = Excellent, B = Good, etc.) using a switch case.
def grade_description(grade):
switch = {
'A': "Good",
'B': "Average",
'C': "Poor",
'D': "Excellent",
'A': "Excellent",
'B': "Good",
'C': "Average",
'D': "Poor",
'F': "Fail"
}
return switch.get(grade, "Not a valid grade")
return switch.get(grade.upper(), "Please enter a valid grade")
if __name__ == "__main__":
rs = grade_description('Z')
print(rs)


13 changes: 11 additions & 2 deletions problems/easy/easy_q16.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Print the Sum of First and Last Array Element
def sum_first_last(arr):
return arr[1] + arr[-1]
return arr[0] + arr[-1]
if __name__ == "__main__":
# Handle the input by Yourself
sum_first_last()

arr=[]
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(sum_first_last(arr))
14 changes: 10 additions & 4 deletions problems/easy/easy_q17.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Print X N Times
def print_x_n_times(x, n):
for i in range(1, n): # Bug: Loop runs one less time than expected
print(x)
def print_x_n_times(x, n): # Bug: Loop runs one less time than expected
print(x*n)
if __name__ == "__main__":
# Handle the input by Yourself
print_x_n_times()

n=int(input("Enter the number of times:"))
x="X"

x=input("Enter a character:")
n=int(input("enter the number of times to loop:"))

print_x_n_times(x,n)
10 changes: 8 additions & 2 deletions problems/easy/easy_q18.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Print Last Character of String
def last_char_of_string(s):
return s[-2] # 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
last_char_of_string()

s=input("Enter the string:")
print(last_char_of_string(s))

s=[7,8,9,6]
print( last_char_of_string(s))

48 changes: 30 additions & 18 deletions problems/easy/easy_q2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,54 @@
def largest_of_two(a, b):
if a > b:

return a
return a
else:
return b
if __name__=="__main__":
a = int(input("Enter the First Number :"))
b = int(input("Enter the Second Number :"))
res = largest_of_two(a,b)
print(res)


return a

return b

return a
else:
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)
print(res,"is the largest number")

res = largest_of_two(num1,num2)

print(res)


print(res)

print(res)


print(num1,"larger")
else:
return b
print(num2,"larger")



if __name__ == "__main__":
num1 = int(input("Enter the First Number :"))
num2 = int(input("Enter the Second :"))
res = largest_of_two(num1,num1)
res = largest_of_two(num1,num2)
print(res)


return a

return a

else:
return b
if __name__ == "__main__":
num1 = int(input("Enter the First Number :"))
num2 = int(input("Enter the Second Number :"))
res = largest_of_two(num1,num2)
keerthi
print("The Largest Number is",res)

print(res)


main


26 changes: 26 additions & 0 deletions problems/easy/easy_q3.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# 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"
else:
return "Leap Year"


if year % 4 == 0 or year % 100 == 0 or year % 400 == 0:
return "Leap Year"
else:
return "Not a Leap Year"


if year % 4 == 0:
if year % 100 == 0:
return "Not a Leap Year"
Expand All @@ -10,6 +22,16 @@ 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"



return "Leap Year"
return "Not a Leap Year"
Expand All @@ -23,6 +45,10 @@ def is_leap_year(year):
return "Not a Leap Year"






if __name__ == "__main__":

num = int(input("Enter the number :"))
Expand Down
23 changes: 20 additions & 3 deletions problems/easy/easy_q4.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
# Positive, Negative, or Zero: Accept a number and check if it is positive, negative, or zero.
def check_number(num):

print("The given number is Negative" if (num < 0 ) else "The given number is Positive" if (num > 0) else "The given number is Zero")
if __name__ == "__main__":
num = int(input("Enter the Number : "))
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:
print("Positive")
else:
keerthi
print("Number is Zero")


if __name__ == "__main__":
num = int(input("Enter the Number : "))
Expand All @@ -17,8 +32,10 @@ def check_number(num):
if __name__ == "__main__":
num = int(input("Enter the Number : "))
res = check_number(num)
print(res)
main




print(res)



Loading