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 punctuation should be used in the blank?
if<condition>_
statement-block 1
else:
statement-block 2
Write a note on the break statement.
Write is the syntax of if..else statement?
Define control structure.
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
Using if..else..Elif statement writes a suitable program to display the largest of 3 numbers.
Write the syntax of the while loop.
List the differences between break and continue statements.
Write a program to display all 3 digit odd numbers.
