Write a python program to create a table of given number using function.

''' defining/creating a function  ''' 

def table(n):

    for i in range(1,11,1):

        mul=n*i

        print(n,end="")

        print("*",end="")

        print(i,end="")

        print("=",end="")

        print(mul)  ''' printing multiplication  '''


s=input("Enter number: ")  ''' Accept number from user '''

table(int(s))  ''' function called '''

0 Comments