This repository contains solutions and practice programs for the exercises from Tony Gaddis’ book Starting Out with Python. Each chapter folder mirrors the structure of the book and includes short Python scripts that demonstrate and reinforce programming concepts.
Exercises are organized by chapter:
Programming_Foundations_Exercises/
├── Chapter 02/ # Variables, input, output, simple calculations
│ ├── Exercise 2-1.py
│ ├── Exercise 2-2.py
│ ├── ...
│ ├── compound_interest.py
│ └── grapevines.py
│
├── Chapter 03/ # Decision structures (if/else)
│ ├── Exercise 3-1.py
│ ├── Exercise 3-2.py
│ └── ...
│
├── Chapter 04/ # Repetition structures (loops)
│ ├── Exercise 4-1.py
│ ├── Exercise 4-2.py
│ └── ...
│
├── Chapter 05/ # Functions
├── Chapter 06/ # Files and exceptions
├── Chapter 07/ # Lists and tuples
└── ...
Each exercise script is standalone — you can run it individually and study the output.
- Python 3.8+ (any recent version will work)
- (Optional) a virtual environment for isolation
From the project root, run:
python "Chapter 02/Exercise 2-1.py"
Or first move into a chapter folder:
cd "Chapter 03"
python "Exercise 3-5.py"
This repository is meant for:
- Students following Starting Out with Python
- Learners practicing foundational Python exercises
- Instructors who want quick examples for teaching
Each program demonstrates a single concept, making it easy to test, modify, and extend.
- T. Gaddis, Starting Out with Python, Pearson Education
This repo is primarily for personal/educational use. If you spot errors or want to add more exercises, feel free to suggest improvements.
This repository is for educational and personal learning purposes only. The exercises are adapted from the book and provided here as learning material.