Skip to content

Python-Foundations-Programming/Programming_Foundations_Examples

Repository files navigation

📘 Programming Foundations Examples

This repository contains example programs from Tony Gaddis' book Starting Out with Python. The examples are organized by chapter and demonstrate key programming concepts step by step, making it easier to learn the foundations of Python.


📂 Repository Structure

The examples are grouped by chapter, following the structure of the book:

Programming_Foundations_Examples/
├── Chapter_02/   # Variables, input, output, basic math
├── Chapter_03/   # Decision structures (if/else)
├── Chapter_04/   # Loops and repetition structures
├── Chapter_05/   # Functions
├── Chapter_06/   # Files and exceptions
├── Chapter_07/   # Lists and tuples
├── Chapter_08/   # More about strings
├── Chapter_09/   # Dictionaries and sets

Each folder contains small, focused .py scripts such as:

  • simple_math.py
  • loan_qualifier.py
  • for_loop_with_break.py
  • commission.py
  • test_score_average.py

These scripts are designed to be short and self-contained, so learners can run and modify them easily.


🚀 Getting Started

Requirements

  • Python 3.8+ (any recent version should work)
  • (Optional) A virtual environment if you want to install additional dependencies

Running an Example

Clone this repository and run any example with:

python Chapter\ 02/simple_math.py

Or from inside the folder:

cd "Chapter 02"
python simple_math.py

🎯 Purpose

These examples are intended for:

  • Students following along with the book
  • Beginners learning programming foundations in Python
  • Instructors needing small teaching examples

📖 References

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

🤝 Contributing

This repository is primarily for educational purposes, but feel free to:

  • Suggest improvements
  • Add comments or explanations
  • Expand with new exercises

📝 License

This repository is for educational and personal use only. Example programs 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