maths.print_multiplication_table

Functions

multiplication_table(→ str)

Prints the multiplication table of a given number till the given number of terms

Module Contents

maths.print_multiplication_table.multiplication_table(number: int, number_of_terms: int) str

Prints the multiplication table of a given number till the given number of terms

>>> print(multiplication_table(3, 5))
3 * 1 = 3
3 * 2 = 6
3 * 3 = 9
3 * 4 = 12
3 * 5 = 15
>>> print(multiplication_table(-4, 6))
-4 * 1 = -4
-4 * 2 = -8
-4 * 3 = -12
-4 * 4 = -16
-4 * 5 = -20
-4 * 6 = -24