Skip to content

Commit

Permalink
fixed sum function
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad Abtahi committed Sep 5, 2022
1 parent b082fd9 commit 27c2845
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def recieveNumber():

def outNumber(num):
for i in num:
print(i, end=" ")
print(i, end="")

def reverseNumber(num):
outNum = []
Expand All @@ -29,14 +29,15 @@ def addNumbers(firstNumber, secondNumber):

outNum = []

for n in range(len(maxLen)):
for n in range(len(maxLen) + 1):
outNum.append(0)

for n in range(len(maxLen)):
outNum[n] += maxLen[n]
outNum[n] += minLen[n]
if outNum[n] > 9:
outNum[n] -= 10
outNum[n + 1] += 1

return reverseNumber(outNum)

Expand Down

0 comments on commit 27c2845

Please sign in to comment.