Skip to content

Python-Foundations-Programming/Programming_Foundations_Exercises

Repository files navigation

📘 Programming Foundations – Exercises

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.


📂 Repository Structure

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.


🚀 Getting Started

Requirements

  • Python 3.8+ (any recent version will work)
  • (Optional) a virtual environment for isolation

Run an exercise

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"

🎯 Purpose

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.


📖 References

  • T. Gaddis, Starting Out with Python, Pearson Education

🤝 Contributing

This repo is primarily for personal/educational use. If you spot errors or want to add more exercises, feel free to suggest improvements.


📝 License

This repository is for educational and personal learning purposes only. The exercises are adapted from the book and provided here as learning material.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages