Posts by Iago Paschoal • 1 point
1 post
-
0
votes2
answers295
viewsQ: What’s the difference between using Return and print in this recursive function that calculates the sum of numbers?
I made a simple function in Python to give me the sum of the numbers n until 0: def retorna(n, zero, soma): if n <= zero: soma += n return soma retorna(n+1, zero, soma) ret = retorna(1, 5, 0)…