program to find the table of given number in python -
n=int(input("Enter any number to find the tablen"))
#by for loop
print("With the help of for loop")
for i in range(1,11):
print(str(n)+"*"+str(i)+"="+str(n*i))
#by while loop
print("With the help of while loop")
i=1
while(i<11):
print(str(n)+"*"+str(i)+"="+str(n*i))
i=i+1
#by recursion
print("With the help of recursion")
def table(n,i):
if i==11:
return
print(str(n)+"*"+str(i)+"="+str(n*i))
table(n,i+1)
table(n,1)
Enter any number to find the table
3
With the help of for loop
3*1=3
3*2=6
3*3=9
3*4=12
3*5=15
3*6=18
3*7=21
3*8=24
3*9=27
3*10=30
With the help of while loop
3*1=3
3*2=6
3*3=9
3*4=12
3*5=15
3*6=18
3*7=21
3*8=24
3*9=27
3*10=30
With the help of recursion
3*1=3
3*2=6
3*3=9
3*4=12
3*5=15
3*6=18
3*7=21
3*8=24
3*9=27
3*10=30