If I have some function like that:
def function(some number, steps):
if steps == 1: return 1
result = some calculation + function(some number, steps - 1)
return round(result, 2)
which returns some float number.
My question is: Is there a way to return rounded result only when I return result from whole function but not from recursive call (to save precision to calculation).
I hope you understand my question.
Thanks in advance.