Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Muhammad-Ali-Software-Engineer/multiplication-tables-generator

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
2 Commits
 
 
 
 
 
 

Repository files navigation

Multiplication Tables Generator 📚 (Python)

A simple Python program that automatically generates multiplication tables from 2 to 20 and saves each table as a separate text file inside a folder.


📌 Project Overview

This project demonstrates how to use Python loops, functions, and file handling to generate multiplication tables.

For each number from 2 to 20, the program creates a text file containing its multiplication table (1–10). All generated files are stored in a folder named tables.


✨ Features

  • Generate multiplication tables from 2 to 20
  • Save each table in a separate .txt file
  • Automatically organize files inside a tables folder
  • Simple and beginner-friendly Python project

🛠 Technologies Used

  • Python 3
  • Functions
  • For Loops
  • File Handling
  • String Manipulation

📚 Python Concepts Demonstrated

  • Functions
  • Loops
  • File Creation
  • Writing to Files
  • String Formatting

📂 Project Structure

Multiplication-Tables-Generator/
│
├── main.py
├── tables/
│   ├── table_2.txt
│   ├── table_3.txt
│   ├── ...
│   └── table_20.txt
└── README.md

▶️ How to Run

1. Clone the repository

git clone https://github.com/Muhammad-Ali-Software-Engineer/multiplication-tables-generator.git

2. Navigate to the project folder

cd multiplication-tables-generator

3. Run the program

python main.py

📄 Sample Output (table_5.txt)

5 x 1 = 5
5 x 2 = 10
5 x 3 = 15
5 x 4 = 20
5 x 5 = 25
5 x 6 = 30
5 x 7 = 35
5 x 8 = 40
5 x 9 = 45
5 x 10 = 50

🎯 Learning Outcomes

This project helps beginners understand:

  • Python functions
  • Iteration using loops
  • File handling
  • Creating multiple files automatically
  • Working with directories
  • String formatting using f-strings

🚀 Future Improvements

  • Allow users to specify the table range
  • Generate tables up to any multiplier (e.g., 20 or 100)
  • Save tables in PDF format
  • Create a GUI version using Tkinter
  • Export tables to CSV or Excel

👨‍💻 Author

Muhammad Ali

  • 🎓 BS Software Engineering Student
  • 🐍 Python Enthusiast
  •  🇵🇰 Pakistan

⭐ If you found this project helpful, consider giving it a star!

About

A simple Python program that generates multiplication tables from 2 to 20 and saves each table as a separate text file using file handling.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.