Skip to content

Commit

Permalink
function to output number normally
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad Abtahi committed Sep 5, 2022
1 parent 66e7006 commit b082fd9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ def recieveNumber():
num.append(int(digit))
return num

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

def reverseNumber(num):
outNum = []
for digit in reversed(num):
Expand Down Expand Up @@ -36,4 +40,4 @@ def addNumbers(firstNumber, secondNumber):

return reverseNumber(outNum)

print(addNumbers(recieveNumber(), recieveNumber()))
outNumber(addNumbers(recieveNumber(), recieveNumber()))

0 comments on commit b082fd9

Please sign in to comment.