A multiplication table printer

Write code · Basic · §7.1, §8.1, §9.1 Talking to your program

Complete the function print_multiplication_table, which takes a number n and prints the nine lines of its times table, from 3 x 1 = 3 to 3 x 9 = 27 when n is 3. The two lines at the bottom call the function with the number you type.

Starter code

def print_multiplication_table(n):
    # Write your code here
    pass

n = int(input("Times table: "))
print_multiplication_table(n)

Solve this problem in your browser

Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.