0% found this document useful (0 votes)
5 views2 pages

Python Multiplication Table Generator

The document is a Python script that generates the multiplication table for a user-inputted number. It prompts the user to enter a number and then uses a for loop to print the multiplication results from 1 to 10. An example output for the number 7 is provided, showing the complete multiplication table.

Uploaded by

c.felci
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Python Multiplication Table Generator

The document is a Python script that generates the multiplication table for a user-inputted number. It prompts the user to enter a number and then uses a for loop to print the multiplication results from 1 to 10. An example output for the number 7 is provided, showing the complete multiplication table.

Uploaded by

c.felci
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Python Lab

numb = int(input(" Enter a number : "))

# using the for loop to generate the multiplication tables

print("Table of: ")

for a in range(1,11):

print(num,'x',a,'=',num*a)

Output

Enter the number : 7

Multiplication Table of :

7x1=7

7 x 2 = 14

7 x 3 = 21

7 x 4 = 28
7 x 5 = 35

7 x 6 = 42

7 x 7 = 49

7 x 8 = 56

7 x 9 = 63

7 x 10 = 70

You might also like