Table with recursion

Python table with recursion

Hey internet mates here we are going to make a python program to print the whole number table of the inserted number.

def table(n,a=1):
    while a<11:
        print(n,"X",a,'=',n*a)
        return table(n,a+1)
    else:
        pass
x=int(input("enter the number:"))
table(x,1)
        

Leave a Comment

Your email address will not be published.