Tutorial Gateway

  • C Language
  • Java
  • R
  • SQL
  • MySQL
  • Python
  • BI Tools
    • Informatica
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • QlikView
  • Js

Python Program to Print Multiplication Table

by suresh

Write a Python Program to Print Multiplication Table using For Loop, and While Loop with example.

Python Program to Print Multiplication Table using For loop

This Python program will print multiplication table from 8 to 10 using For Loop

# Python Program to Print Multiplication Table

print(" Multiplication Table ")

for i in range(8, 10):
    for j in range(1, 11):
        print('{0}  *  {1}  =  {2}'.format(i, j, i*j))
    print('==============')

OUTPUT

Python Program to Print Multiplication Table 1

Python Program to Print Multiplication Table Example 2

This program allows user to enter any integer value. Next, it will print multiplication table from user entered value to 10

# Python Program to Print Multiplication Table

num = int(input(" Please Enter any Positive Integer lessthan 10 : "))

print(" Multiplication Table ")

for i in range(num, 10):
    for j in range(1, 11):
        print('{0}  *  {1}  =  {2}'.format(i, j, i*j))
    print('==============')

OUTPUT

Python Program to Print Multiplication Table 2

Python Program to display Multiplication Table using While loop

This program is same as above but this time we are using While Loop

# Python Program to display Multiplication Table

i = int(input(" Please Enter any Positive Integer lessthan 10 : "))

print(" Multiplication Table ")

while(i <= 10):
    j = 1
    while(j <= 10):
        print('{0}  *  {1}  =  {2}'.format(i, j, i*j))
        j = j + 1
    print('==============')
    i = i + 1
               

OUTPUT

Python Program to Print Multiplication Table 3

Placed Under: Python, Python Examples

Trending Posts

POW in C Programming

Python Lambda

C Program to Replace First Occurrence of a Character in a String

Python Dictionary popitem

SQL GROUP BY Clause

Python Program to Print Odd Numbers from 1 to N

Stacked Bar Chart in Tableau

Python ASINH

Filters at Dataset Level in SSRS

C Program to check Matrix is a Symmetric Matrix

  • C Programs
  • Java Programs
  • SQL FAQ’s
  • Python Programs
  • SSIS
  • Tableau
  • JavaScript

Copyright © 2019 | Tutorial Gateway· All Rights Reserved by Suresh

Home | About Us | Contact Us | Privacy Policy