Doing your times tables#
Write a function multiplication_tables
which takes in as input an integer num
, and prints out lists with the the first 10 multiples of all the numbers from 1 to num
(inclusive).
Function Name: multiplication_tables
Parameter: num
- A positive integer up to which we have to print the first 10 multiples.
Description: For each number from 1 to num, the function should print out a list containing the first 10 multiples of the number.
For example, if we run multiplication_tables(3)
, your program should print out:
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
[2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
[3, 6, 9, 12, 15, 18, 21, 24, 27, 30]