5. Print Multiplication Table

Acceptance 100% 1 accepted 1 submissions

Easy
No topics listed
No companies listed
Write a Python program that asks the user to enter a number. Then print the multiplication table of that number from 1 to 10. Each line should show the multiplication result in the format: number x i = result. The program must take the number as input from the user.

Example 1

Input
9
Output
9 x 1 = 9
9 x 2 = 18
9 x 3 = 27
9 x 4 = 36
9 x 5 = 45
9 x 6 = 54
9 x 7 = 63
9 x 8 = 72
9 x 9 = 81
9 x 10 = 90

Explanation 9 multiplied from 1 to 10 gives the multiplication table of 9

Example 2

Input
1
Output
1 x 1 = 1
1 x 2 = 2
1 x 3 = 3
1 x 4 = 4
1 x 5 = 5
1 x 6 = 6
1 x 7 = 7
1 x 8 = 8
1 x 9 = 9
1 x 10 = 10

Explanation 1 multiplied from 1 to 10 gives the multiplication table of 1

Example 3

Input
5
Output
5 x 1 = 5
5 x 2 = 10
5 x 3 = 15
5 x 4 = 20
5 x 5 = 25
5 x 6 = 30
5 x 7 = 35
5 x 8 = 40
5 x 9 = 45
5 x 10 = 50

Explanation 5 multiplied from 1 to 10 gives the multiplication table of 5

Acceptance 100%
Accepted 1
Submissions 1
Auto-save
Saved Ln 1, Col 1
Submit a solution to see its status here.
Input
Expected Output
9 x 1 = 9 9 x 2 = 18 9 x 3 = 27 9 x 4 = 36 9 x 5 = 45 9 x 6 = 54 9 x 7 = 63 9 x 8 = 72 9 x 9 = 81 9 x 10 = 90
No results yet
Run your code to test it against the sample cases.
Problem List