English
Tamil Nadu Board of Secondary EducationHSC Science Class 12

Write a program to display a multiplication table for a given number. - Computer Science

Advertisements
Advertisements

Question

Write a program to display a multiplication table for a given number.

Answer in Brief

Solution

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
>>>

shaalaa.com
Control Structure
  Is there an error in this question or solution?
Chapter 6: Control Structures - Evaluation [Page 88]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 12 TN Board
Chapter 6 Control Structures
Evaluation | Q 4. | Page 88
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×