Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/muhammadalamzeb/python_projects/llms.txt

Use this file to discover all available pages before exploring further.

Every project in this collection runs with a single python3 command. This page walks you from a fresh terminal to a running calculator session in under two minutes.
1

Verify Python is installed

Open your terminal and run:
python3 --version
You should see output like:
Python 3.11.4
Any version 3.6 or higher works. If the command is not found, download Python from python.org and re-open your terminal.
2

Clone the repository

git clone https://github.com/muhammadalamzeb/python_projects.git
cd python_projects
This downloads all five scripts into a single python_projects directory. No additional setup is needed.
3

Run your first project

Start the calculator:
python3 Calculator_With_History.py
The prompt appears immediately. Try an expression, check your history, then quit:
------------- CALCULATOR -----------------
Calculation-> ( + - / * ) OR COMMAND (History, Clear, Quit): 5 + 3
Result: 8
Calculation-> ( + - / * ) OR COMMAND (History, Clear, Quit): 12 * 4
Result: 48
Calculation-> ( + - / * ) OR COMMAND (History, Clear, Quit): History
12 * 4=48
5 + 3=8
Calculation-> ( + - / * ) OR COMMAND (History, Clear, Quit): Quit
Supported operators are +, -, *, and /. Always include a space between the number, operator, and second number (for example, 10 / 2, not 10/2).
4

Explore the other projects

Each script launches the same way. Run any of the following from inside the python_projects directory:
python3 Number_Guessing_Game.py
python3 Dice_Game.py
python3 Fake_Headline_Generator.py
python3 Restaurant_Management_System.py

Running the calculator on different platforms

The command is identical on every platform — only the way you open a terminal differs.
python3 Calculator_With_History.py

Example calculator session

Below is a complete session showing arithmetic, the History command, the Clear command, and a clean exit.
------------- CALCULATOR -----------------
Calculation-> ( + - / * ) OR COMMAND (History, Clear, Quit): 100 / 4
Result: 25
Calculation-> ( + - / * ) OR COMMAND (History, Clear, Quit): 9 - 3
Result: 6
Calculation-> ( + - / * ) OR COMMAND (History, Clear, Quit): History
9 - 3=6
100 / 4=25
Calculation-> ( + - / * ) OR COMMAND (History, Clear, Quit): Clear
History cleared!
Calculation-> ( + - / * ) OR COMMAND (History, Clear, Quit): 7 * 8
Result: 56
Calculation-> ( + - / * ) OR COMMAND (History, Clear, Quit): Quit
The calculator saves your history to a file called history.txt in whichever directory you run the script from. If you run it from your home directory, the file appears there. Move to a dedicated project folder first if you want to keep history files organised.

Next steps

Calculator with History

Full usage guide, command reference, and code walkthrough for the calculator.

Number Guessing Game

How the random number loop and input validation work under the hood.

Dice Game

Roll two dice and understand how random.randint drives the game.

Fake Headline Generator

See how list sampling creates endlessly varied breaking-news headlines.

Restaurant Management System

Browse the menu, place an order, and see how the running total is tracked.

Build docs developers (and LLMs) love