Print 1 to 100 without loop in Python #Shorts

preview_player
Показать описание
This problem can be solved using the recursion. We will create a function that will be called recursively. As we know that a recursive function has basically two sections.
The base case and the recursive call and other operation. In this function the base case is the argument n is greater than 1. Until it reaches 1, the function will be called recursively. Now at the end it will print the value of n. Thus the entire system will generate the numbers.

#shorts #python #1to100 #recursion #loop #python3
Рекомендации по теме
Комментарии
Автор

print(*list(range(1, 100))) try this bro

SRINIVAStheDEVELOPER
welcome to shbcf.ru