A collection of Python exercises and challenges for beginners to advanced learners, with solutions and alternative approaches.
PYTHONS-101/
│
├── basics/
│ ├── challenges/
│ │ └── beginner-exercises/
│ │ └── 1. Guessing Game/
│ │ ├── guessing_game.py
│ │ └── README.md
│ │
│ └── solutions/
│ └── beginner-exercises/
│ └── 1. Guessing Game/
│ ├── alternative-solutions/
│ ├── README.md
│ └── guessing_game.py
│
└── README.md
- Guessing Game - Try to guess a randomly generated number within a specified range
(More exercises coming soon!)
We welcome all contributions! Here's how you can help:
- Fork the repository
- Create a branch named
challenge-name+username(e.g.,guessing-game+johndoe) - Add your solution:
- For alternative solutions, add them in the
alternative-solutionsfolder with filename format:exercise_name_username.py(e.g.,guessing_game_refilwe-m.py) - For new challenges, create appropriate folders following the existing structure
- For alternative solutions, add them in the
- Open a Pull Request
- ✅ Optimize your code for efficiency
- ✅ Add clear comments explaining your approach
- ✅ Include docstrings for functions
- ✅ Follow PEP 8 style guidelines
- ❌ Avoid AI-generated solutions (this is a learning resource)
- ❌ Don't modify existing solutions without discussion
-
Clone the repository:
git clone https://github.com/your-username/PYTHONS-101.git
-
Work on challenges in the basics/challenges/ folder
-
Check the solutions/ folder if you get stuck
-
Compare different approaches to learn various techniques
🏆 Why Contribute?
- Improve your Python skills through practical exercises
- Learn from others' solutions and approaches
- Help build a valuable learning resource for the community
- Get feedback on your coding style and techniques
📜 License This project is open source and available under the MIT License.
🙏 Acknowledgments Special thanks to all contributors who help make this a valuable learning resource!