Print numbers from 1 to n using recursive function in Python tutorial

Print numbers from 1 to n using recursive function in Python tutorial

United Top Tech

1 год назад

2,596 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@pappu1022
@pappu1022 - 09.04.2023 16:46

I did not understand after base case was reached, f(0) returned value to f(1) because return keyword was there in base case. But how did f(1) returned value to f(2),f(2) returned value to f(3),f(3) returned value to f(4) and so on till 7, if there is no return keyword inside 'else' loop?

Ответить