Advertisements
Advertisements
प्रश्न
Write a program to display a multiplication table for a given number.
Advertisements
उत्तर
Coding:
num=int(input(“Display Multiplication Table of “))
for i in range(1,11):
print(i, x ,num, ‘=’, num*i)
Output:
Display Multiplication Table of 2
1 x 2 = 2
2 x 2 = 4
3 x 2 = 6
4 x 2 = 8
5 x 2 = 10
6 x 2 = 12
7 x 2 =14
8 x 2 = 16
9 x 2 =18
10 x 2 = 20
>>>
APPEARS IN
संबंधित प्रश्न
How many important control structures are there in Python?
Which statement is generally used as a placeholder?
Which is the most comfortable loop?
Which amongst this is not a jump statement?
List the control structures in Python.
Write is the syntax of if..else statement?
Write a note on if..else structure.
Write the syntax of the while loop.
Write a detail note on for loop?
Write a detailed note on if..else..elif statement with suitable example.
