MeshWorld India LogoMeshWorld.

How to Display Multiplication Tables in Python

Listen to ArticleAI Speech
~2 min read narration
100%
How to Display Multiplication Tables in Python

In this article we have prepared a program to calculate and display multiplication table, using for loop for any number provided by user.

Program to get product table using range function

# Multiplication table (from 1 to 10) in Python

# Uncomment below line to take input from the user
# num = int(input("Get multiplication table for: "))
# Comment the below line and uncomment above line if you want to take input from user take
num = 12

# Below loop will iterate 10 times starting from 1 to 10
for i in range(1, 11):
  print(num, 'x', i, '=', (num * i))
12 x 1 = 12
12 x 2 = 24
12 x 3 = 36
12 x 4 = 48
12 x 5 = 60
12 x 6 = 72
12 x 7 = 84
12 x 8 = 96
12 x 9 = 108
12 x 10 = 120

Uncomment num = int(input("Get multiplication table for? ")) line if you want to take input from user. For illustrating example we’ve assign a fix value to num variable i.e 12.

The range(1, 11) function will iterate from 1 to 10 i.e 10 times. First argument(1) specified in range(1, 11) function will be inclusive and second argument(11) will be excluded from range.

You can also try with different loops.

Hope you like this!

Keep helping and happy 😄 coding

Reader Quality Feedback

Did this technical guide help solve your problem?

Suggest Errata ($0)
Vishnu
Primary Author

Vishnu

Founder & Principal Architect at MeshWorld. Senior engineer and instructor specializing in AI agent systems, scalable web architecture, and modern development workflows.

Explore Author Archive
Compute Fuel & Open Testbed
100% Independent & Verified

Fuel High-Density, Zero-Fluff Engineering Deep-Dives

Every guide on MeshWorld is validated on physical Linux nodes and reproducible testbeds. If this article saved you hours of debugging or unblocked production, consider funding our next cluster run.

Weekly Dispatch

Join MeshWorld Dispatch

Get practical tutorials, system blueprints, and curated AI engineering notes straight to your inbox. No fluff, zero spam.

Zero spam. 1-click unsubscribe anytime.Prefer RSS?
Curated Continuations

Up Next in This Domain.

Browse Full Archive