An open API service indexing awesome lists of open source software.

https://github.com/kissssu/basic-python-projects

This Python repository provides beginner-friendly and intermediate-level projects to practice programming skills or learn Python basics.
https://github.com/kissssu/basic-python-projects

python

Last synced: 2 months ago
JSON representation

This Python repository provides beginner-friendly and intermediate-level projects to practice programming skills or learn Python basics.

Awesome Lists containing this project

README

        

# Python Basic Projects
This repository contains beginner-friendly and intermediate-level Python projects, perfect for practicing programming skills or learning Python basics. Each project is designed to be simple yet insightful, covering various Python concepts like loops, conditionals, functions, and basic file handling.

# Project Structure
The projects are divided into two levels: Beginner and Intermediate. Each project is self-contained and has clear instructions for use.

# Level 1: Beginner-Friendly Projects

#### Number Guessing Game
Description: A game where the computer generates a random number, and the user guesses until they find the correct answer. Feedback like "too high" or "too low" helps guide the player.
Concepts Used: Random number generation, loops, conditionals.

#### Simple Calculator
Description: Performs basic arithmetic operations (addition, subtraction, multiplication, and division) on two numbers provided by the user.
Concepts Used: Functions, user input, mathematical operations.

#### Temperature Converter
Description: Converts temperatures between Celsius and Fahrenheit based on user input.
Concepts Used: Input validation, basic mathematical formulas, conditionals.

#### Mad Libs Generator
Description: A fun program where users input words (nouns, verbs, adjectives), which are then integrated into a pre-defined story template.
Concepts Used: String manipulation, user input, formatting.

#### Basic Text-Based Adventure Game
Description: Creates a simple interactive story where the player makes decisions that affect the outcome.
Concepts Used: Conditional statements, user input, storytelling.

# Level 2: Intermediate Projects

#### Rock-Paper-Scissors Game
Description: The classic game against a computer AI. The winner is determined based on game rules (rock beats scissors, scissors beat paper, paper beats rock).
Concepts Used: Randomization, conditionals, loops.

#### Basic Quiz Game
Description: A multiple-choice quiz that evaluates the user's knowledge and calculates their score.
Concepts Used: Lists, dictionaries, loops, conditionals.

#### Password Generator
Description: Generates secure passwords of user-specified lengths, with options for including special characters, numbers, and uppercase/lowercase letters.
Concepts Used: Randomization, string manipulation.

#### Simple Text Analyzer
Description: Analyzes a given text to count words, characters, sentences, and calculate the average word length.
Concepts Used: String processing, loops, basic statistics.

#### Basic To-Do List App
Description: A simple text-based to-do list manager that allows users to add, remove, and mark tasks as completed.
Concepts Used: Lists, input/output, conditionals.

## Requirements
This repository includes a requirements.txt file that lists any necessary dependencies. To install these dependencies, use:

```bash
pip install -r requirements.txt
```

Getting Started
Clone the repository:
```bash
git clone https://github.com/kissssu/Basic-Python-Projects.git
cd python-basic-projects
```

Install dependencies (if any):
```bash
pip install -r requirements.txt
```

Navigate to the project folder of your choice and run the respective Python file:
```bash
python project_name.py
```

# Why These Projects?

Beginner-Friendly: Ideal for newcomers to Python or programming in general.
Intermediate-Level Challenge: Helps bridge the gap between beginner concepts and more advanced programming techniques.
Skill Development: Covers fundamental concepts like control flow, data structures, file handling, and user input.

## Updates/Changes

This section summarizes the general updates and improvements made to the Python projects in this repository. These changes apply across multiple projects and focus on enhancing code quality, robustness, and user experience.

* **Input Validation:** A core focus has been adding robust input validation. This includes checking for correct data types (e.g., integers, floats), valid ranges, and preventing common errors like division by zero. This makes the programs more resilient to unexpected user input.
* **Error Handling:** `try-except` blocks have been implemented to handle potential errors gracefully. This prevents program crashes and provides informative messages to the user.
* **Loops for Multiple Actions:** Loops have been added to allow users to perform multiple operations (calculations, conversions, games, etc.) without restarting the program. This significantly improves usability.
* **Clearer Output:** Output messages have been refined to be more informative and user-friendly. Formatting has also been improved for better readability (e.g., rounding floating-point numbers).
* **Code Style Improvements:** Code style has been enhanced for better readability and maintainability. This includes using more Pythonic idioms, clearer variable names, and simplifying logic where possible.
* **Handling Edge Cases:** The programs now handle various edge cases, such as empty lists, division by zero, and invalid input, ensuring they function correctly under a wider range of conditions.
* **Continue/Exit Prompts:** Users are now prompted after each action to continue or exit the program, providing more control over the program's flow.

# Contributing
Feel free to fork this repository and submit pull requests with improvements or additional features. Contributions are always welcome!