Write a Python program that takes a number from the user and prints its multiplication table up to 10.
Example 1:
Input: 5
Output:
5
10
15
20
25
30
35
40
45
50
Example 2:
Input: 2
Output:
2
4
6
8
10
12
14
16
18
20
A for loop could be used to iterate 10 times, each time multiplying the input number by the current iteration count.
n = int(input())
for i in range(1, 11):
print(n * i)
NOTEOwing to browser caching, any code input into the Trinket IDE might carry over across page refreshes or when transitioning between different questions. To commence with a clean slate, either click on the 'Reset Button' found within the IDE's Hamburger icon (☰) menu or resort to using Chrome's Incognito Mode.