Skip to content

Abtahi360/python-mini-projects

Repository files navigation

๐Ÿ Python Mini Projects

This repository contains 10 beginner-friendly Python projects, covering various fundamental programming concepts such as loops, conditionals, functions, and file handling. Each project is designed to help improve problem-solving skills and reinforce Python basics.


๐ŸŽฏ Projects Overview

# Project Description Advanced Features
1 Number Guessing Game Interactive number guessing with AI hints Difficulty levels, Score system, Statistics
2 To-Do List Task management with persistence File storage (JSON), Priority levels, Statistics
3 Calculator Advanced mathematical operations Multiple operations, History, Continuous mode
4 Palindrome Checker String palindrome detection Batch processing, Regex validation
5 Fibonacci Generator Fibonacci sequence with optimizations Memoization, Performance comparison
6 Countdown Timer Customizable countdown with alerts Presets, Progress bars, Sound notifications
7 Password Generator Secure password generation Strength checker, Customization, Batch mode
8 Email Slicer Email validation and analysis Regex validation, Provider detection, Statistics
9 Rock Paper Scissors Game with AI and scoring Difficulty levels, Match tracking, Statistics
10 Quiz Game Multi-category interactive quiz Shuffled questions, Scoring, Multiple difficulties

๐Ÿ“š Project Details

1๏ธโƒฃ Number Guessing Game (1-Number_Guessing_Game.py)

A classic guessing game with modern enhancements.

Features:

  • ๐ŸŽฎ 3 Difficulty Levels: Easy (1-50), Medium (1-100), Hard (1-500)
  • ๐Ÿ’ก Smart Hints: "Higher" or "Lower" guidance
  • ๐Ÿ“Š Score System: Points vary by difficulty
  • ๐Ÿ“ˆ Statistics Tracking: Win rate, total score, games played
  • ๐ŸŽฏ Menu-Driven Interface

How to Play:

python 1-Number_Guessing_Game.py

Key Functions:

  • select_difficulty() - Choose game difficulty
  • get_hint() - Provide helpful hints
  • play_round() - Execute single game
  • display_stats() - Show player statistics

2๏ธโƒฃ To-Do List (2-To-do-List.py)

Advanced task management system with persistent storage.

Features:

  • ๐Ÿ’พ JSON File Storage: Automatically saves tasks
  • โœ… Task Status Tracking: Mark tasks complete/pending
  • ๐Ÿท๏ธ Priority Levels: low, medium, high
  • ๐Ÿ“Š Statistics: Completion rate, task count
  • โœ๏ธ Full CRUD Operations: Create, Read, Update, Delete

How to Run:

python 2-To-do-List.py

Menu Options:

  1. Add Task (with priority)
  2. View All Tasks
  3. View Pending Tasks Only
  4. Mark Task Complete
  5. Update Task
  6. Delete Task
  7. View Statistics

3๏ธโƒฃ Calculator (3-simple-calculaator.py)

Full-featured calculator with advanced operations.

Supported Operations:

  • โž• Addition (+)
  • โž– Subtraction (-)
  • โœ–๏ธ Multiplication (*)
  • โž— Division (/)
  • ๐Ÿ“Š Modulus (%)
  • ๐Ÿ”ข Power (**)
  • โˆš Square Root
  • % Percentage calculations

Features:

  • ๐Ÿ“œ Calculation History: View all previous calculations
  • ๐Ÿ”„ Continuous Mode: Multiple calculations without restarting
  • โŒ Error Handling: Division by zero, invalid inputs
  • ๐ŸŽฏ Clean Output: Formatted results

4๏ธโƒฃ Palindrome Checker (4-Palindrome-Checker.py)

Advanced palindrome detection with multiple modes.

Features:

  • ๐Ÿ”ค Case-Insensitive Checking: "Racecar" = "racecar"
  • โžก๏ธ Ignore Spaces & Punctuation: "A man, a plan, a canal: Panama"
  • ๐Ÿ“ Batch Processing: Check multiple words at once
  • ๐Ÿ“Š Detailed Analysis: Character counts, reversed strings
  • ๐Ÿท๏ธ Multiple Modes: Single word, sentence, batch

5๏ธโƒฃ Fibonacci Sequence (5-Fibonacci-Sequence.py)

Optimized Fibonacci generation with multiple algorithms.

Methods:

  • ๐Ÿ”„ Iterative Approach: Fast, memory-efficient
  • ๐Ÿ” Recursive with Memoization: Balanced performance
  • ๐Ÿ“Š Pure Recursive: Educational (slower)

Features:

  • โšก Performance Comparison: Compare algorithm speeds
  • ๐ŸŽฏ Range Generation: Get Fibonacci numbers in a range
  • ๐Ÿ’พ Memoization Cache: Optimized recursion
  • ๐Ÿ“ˆ Large Number Support: Generate high-index Fibonacci

6๏ธโƒฃ Countdown Timer (6-CountDown-Timer.py)

Feature-rich countdown timer with presets.

Features:

  • โฑ๏ธ Custom Duration: Any time in seconds or mm:ss format
  • ๐ŸŽฏ Preset Timers: Pomodoro (25m), Short (5m), Study (45m)
  • ๐Ÿ“Š Progress Bar: Visual countdown display
  • ๐Ÿ”” Audio Alerts: System bell when complete
  • ๐Ÿ“ˆ Timer Statistics: Track completed timers

Presets:

  • Pomodoro: 25 minutes
  • Short Break: 5 minutes
  • Medium Break: 15 minutes
  • Long Break: 30 minutes

7๏ธโƒฃ Password Generator (7-Password-Generator.py)

Advanced password generation with security analysis.

Features:

  • ๐Ÿ” Customizable Options:
    • Length (4-128 characters)
    • Character types (uppercase, lowercase, digits, special)
  • ๐Ÿ“Š Strength Checker: Analyzes password security
  • ๐ŸŽฏ Presets: Quick strong password generation
  • ๐Ÿ“ฆ Batch Mode: Generate multiple passwords
  • ๐Ÿ’ก Recommendations: Security improvement tips

Strength Levels:

  • โŒ WEAK (0-2 points)
  • โš ๏ธ FAIR (3-4 points)
  • โœ… GOOD (5-6 points)
  • ๐Ÿ”’ STRONG (7+ points)

8๏ธโƒฃ Email Slicer (8-Email-Slicer.py)

Comprehensive email validation and analysis.

Features:

  • โœ… Regex Validation: RFC 5322 compliant
  • ๐Ÿ” Component Extraction: Username, domain, extension
  • ๐Ÿข Provider Detection: Gmail, Outlook, Yahoo, etc.
  • ๐Ÿ“Š Quality Metrics: Email analysis
  • ๐Ÿ“‹ Batch Validation: Check multiple emails
  • ๐Ÿ“ˆ Statistics: Validity rate tracking

Extracted Information:

  • Full email
  • Username
  • Domain
  • Domain name
  • Extension

9๏ธโƒฃ Rock Paper Scissors (9-Rock-paper_scissser.py)

Advanced game with AI and comprehensive tracking.

Features:

  • ๐ŸŽฎ 3 Difficulty Levels:
    • Easy: Random moves
    • Medium: 30% strategic
    • Hard: 60% strategic
  • ๐Ÿ“Š Score Tracking: Wins, losses, ties, win rate
  • ๐Ÿ“œ Game History: Review all previous rounds
  • ๐Ÿ“ˆ Statistics: Move distribution, performance analysis
  • ๐ŸŽฏ Best of N: Play multiple-round matches

๐Ÿ”Ÿ Quiz Game (10-quiz-game.py)

Interactive quiz with multiple categories and difficulties.

Features:

  • ๐ŸŽ“ 3 Categories:
    • General Knowledge
    • Science
    • Technology
  • ๐Ÿ“š 3 Difficulty Levels: Easy, Medium, Hard
  • ๐Ÿ”€ Question Shuffling: Randomized order
  • ๐Ÿ“Š Scoring System: Points vary by difficulty
  • ๐Ÿ“ˆ Statistics: Accuracy, total points, category performance
  • ๐ŸŽฏ Progress Tracking: Current score display

Difficulty Points:

  • Easy: 10 points
  • Medium: 25 points
  • Hard: 50 points

๐Ÿ› ๏ธ Technologies & Features

Core Technologies

  • Python 3.8+ - Modern Python features
  • Standard Library: json, random, string, time, math, re, functools
  • No External Dependencies - Pure Python implementations

Design Patterns Used

  • ๐Ÿ—๏ธ Object-Oriented Programming: Class-based architecture
  • ๐Ÿ“ฆ Modular Design: Separated concerns
  • ๐Ÿ”„ DRY Principle: Don't Repeat Yourself
  • ๐ŸŽฏ Single Responsibility: Each function does one thing well

Advanced Features

  • โœ… Comprehensive Error Handling: Try-except blocks
  • ๐Ÿ“ Detailed Docstrings: Every function documented
  • ๐Ÿ”ค PEP 8 Compliance: Clean, readable code
  • ๐Ÿ’พ Data Persistence: JSON file storage
  • ๐Ÿ“Š Statistics & Analytics: Track metrics
  • ๐ŸŽจ User-Friendly UI: Clear formatted menus

๐Ÿ“– Learning Outcomes

By studying and using these projects, you'll learn:

Python Fundamentals

  • โœ… Variables, data types, operators
  • โœ… Control flow (if/elif/else, loops)
  • โœ… Functions and parameters
  • โœ… Object-Oriented Programming (OOP)

Advanced Concepts

  • โœ… File I/O and JSON handling
  • โœ… Exception handling and error management
  • โœ… Regular expressions (regex)
  • โœ… Data structures (lists, dictionaries, tuples)
  • โœ… Algorithms and performance optimization
  • โœ… Memoization and caching

Best Practices

  • โœ… Clean code principles
  • โœ… Code documentation
  • โœ… User input validation
  • โœ… Menu-driven interfaces
  • โœ… Statistics and logging
  • โœ… PEP 8 style guidelines

Soft Skills

  • โœ… Project organization
  • โœ… User experience design
  • โœ… Problem-solving approaches
  • โœ… Debugging techniques

๐Ÿ“ License

This project collection is open source and available for educational purposes.


๐Ÿ’ก Contributing

To contribute improvements:

  1. Fork the repository
  2. Create a feature branch
  3. Make your improvements
  4. Submit a pull request

๐Ÿ“ž Support

For questions or issues, please open a GitHub issue or contact the maintainer.


๐ŸŽ‰ Thank You!

Thank you for using these Python mini projects. Happy coding! ๐Ÿš€

Last Updated: April 2024 Python Version: 3.8+ License: Open Source

About

This repository contains 10 beginner-friendly Python projects, covering various fundamental programming concepts. Each project is designed to help improve problem-solving skills and reinforce Python basics.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages