Write A Python Program To Print The Numbers From A Given Number N To Till 0 Using Recursion.
January 31, 2023 by Primegyan 4.82k
Question: Write a Python program to print the numbers from a given number n to till 0 using recursion.
Solution:
def newideas(n):
if (n>=0):
print(n, end=” ”)
newideas(n-1)
num=int(input("Enter any Number"))
newideas(num)
Solution:
Enter any Number 6
6 5 4 3 2 1 0
Video Solution for Python program to print the numbers from a given number n to till 0 using recursion