From b082fd91033ea6a93a27f8bff3c9ce873ab38d0b Mon Sep 17 00:00:00 2001 From: Mohammad Abtahi Date: Mon, 5 Sep 2022 19:07:06 +0430 Subject: [PATCH] function to output number normally --- main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index e61c527..44358cd 100644 --- a/main.py +++ b/main.py @@ -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): @@ -36,4 +40,4 @@ def addNumbers(firstNumber, secondNumber): return reverseNumber(outNum) -print(addNumbers(recieveNumber(), recieveNumber())) \ No newline at end of file +outNumber(addNumbers(recieveNumber(), recieveNumber())) \ No newline at end of file