Write a program that prompts the user to input a number and prints its multiplication table.
Code:
def print_multiplication_table(num):
print("Multiplication table for", num, ":")
for i in range(1, 11):
print(num, "x", i, "=", num * i)
# Prompt the user to input a number
num = int(input("Enter a number: "))
# Print the multiplication table for the entered number
print_multiplication_table(num)
0 Comments