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
संबंधित प्रश्न
Which statement is generally used as a placeholder?
What is the output of the following snippet?
i=1
while True:
if i%3 ==0:
break
print(i,end='')
i +=1
What is the output of the following snippet?
T=1
while T:
print(True)
break
Which amongst this is not a jump statement?
Write a note on the break statement.
Write a note on the range () in the loop?
Write a program to display.
A
A B
A B C
A B C D
A B C D E
Write the syntax of the while loop.
List the differences between break and continue statements.
Write a detail note on for loop?
