Skip to content

A collection of beginner-friendly Python projects focused on mastering loops, control flow, and fundamental programming concepts.

License

Notifications You must be signed in to change notification settings

b5119/python-starter-lab

Repository files navigation

Python Beginner Projects Collection

A collection of beginner-friendly Python projects focused on mastering loops, control flow, and fundamental programming concepts.

🎯 Projects Overview

1. Number Guessing Game

Concepts: While loops, user input validation, random number generation

A fun interactive game where the computer picks a random number and you have 10 attempts to guess it.

Features:

  • Random number generation (1-100)
  • Limited attempts system
  • Input validation
  • Play again functionality

Run: python 01-number-guessing-game/game.py


2. Password Generator

Concepts: For loops, string manipulation, randomization

Generate secure random passwords with customizable criteria.

Features:

  • Customizable length (8-128 characters)
  • Toggle uppercase, lowercase, digits, and symbols
  • Generates 5 passwords at once
  • Input validation

Run: python 02-password-generator/generator.py


3. Simple To-Do List

Concepts: While loops, list operations, menu-driven programs

A command-line task manager to organize your daily activities.

Features:

  • Add, view, complete, and delete tasks
  • Mark tasks as complete
  • Clear all tasks
  • Persistent menu system

Run: python 03-todo-list/todo.py


4. Prime Number Finder

Concepts: Nested loops, algorithms, mathematical operations

Find and verify prime numbers with multiple search modes.

Features:

  • Check if a number is prime
  • Find all primes in a range
  • Find first N prime numbers
  • Optimized algorithm (√n optimization)

Run: python 04-prime-finder/prime_finder.py


🚀 Getting Started

Prerequisites

  • Python 3.6 or higher

Installation

  1. Clone the repository:
git clone https://github.com/b5119/python-beginner-projects.git
cd python-beginner-projects
  1. Run any project:
python 01-number-guessing-game/game.py

📚 Learning Objectives

Each project teaches specific programming concepts:

  • Control Flow: if/else statements, nested conditions
  • Loops: while loops, for loops, loop control (break/continue)
  • Data Structures: Lists, dictionaries
  • Functions: Code organization, reusability
  • Input Validation: Error handling, user experience
  • Algorithms: Prime checking, randomization

🛠️ Technologies Used

  • Python 3
  • Standard Library modules:
    • random - Random number generation
    • string - String constants and operations

📝 Project Structure

python-beginner-projects/
├── README.md
├── 01-number-guessing-game/
│   └── game.py
├── 02-password-generator/
│   └── generator.py
├── 03-todo-list/
│   └── todo.py
└── 04-prime-finder/
    └── prime_finder.py

🎓 Next Steps

After completing these projects, consider:

  • Adding file I/O to save data
  • Creating GUI versions with Tkinter
  • Adding unit tests
  • Implementing more complex algorithms
  • Building web versions with Flask

🤝 Contributing

Feel free to fork this repository and add your own improvements or additional projects!

📄 License

This project is open source and available under the MIT License.

👤 Author

Frank Bwalya - https://github.com/b5119


⭐ If you found these projects helpful, please consider giving this repository a star!

About

A collection of beginner-friendly Python projects focused on mastering loops, control flow, and fundamental programming concepts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages