Write a python program to print Multiplication tables from 2 to 20 whether table values entered by user using Simple Function , Parameterized Function , Return Type with function and return type with parameterized Functions
Write a python program to print Multiplication tables from 2 to 20 whether table values entered by user using Simple …
Share
def print_multiplication_table():
for i in range(2, 21):
print(“Multiplication Table of”, i)
for j in range(1, 11):
print(i, “x”, j, “=”, i*j)
print(“\n”)
print_multiplication_table()
def print_multiplication_table(table):
print(“Multiplication Table of”, table)
for i in range(1, 11):
print(table, “x”, i, “=”, table*i)
print(“\n”)
for i in range(2, 21):
print_multiplication_table(i)
def get_multiplication_table(table):
table_list = []
for i in range(1, 11):
table_list.append(table*i)
return table_list
for i in range(2, 21):
table = get_multiplication_table(i)
print(“Multiplication Table of”, i)
for j in range(10):
print(i, “x”, j+1, “=”, table[j])
print(“\n”)
def get_multiplication_table(table):
table_list = []
for i in range(1, 11):
table_list.append(table*i)
return table_list
def print_multiplication_table(table):
table = get_multiplication_table(table)
print(“Multiplication Table of”, table)
for i in range(10):
print(table[i])
print(“\n”)
for i in range(2, 21):
print_multiplication_table(i)
DOWNLOAD BELOW ATTACHMENT FOR ANSWER: