Welcome to the 21-Day Python Challenge! This project is designed to help you master Python programming in just three weeks. Each day, you will explore new concepts, complete practical exercises, and strengthen your coding skills.
The 21-Day Python Challenge is an intensive program aimed at beginners who want to learn Python programming from the ground up. Whether you're a complete novice or have some coding experience, this challenge will guide you through a structured curriculum to build a solid foundation in Python.
To get started with the challenge, follow these steps:
- Clone this repository to your local machine.
- Make sure you have Python installed (version X.X recommended).
- Open your terminal and navigate to the project directory.
- Execute the daily exercises for the next 21 days.
Each day of the challenge follows this structure:
- Concept Exploration: Learn a new Python concept through interactive examples.
- Practical Exercise: Apply what you've learned by completing a coding exercise.
- Code Review: Review the provided solution and compare it with your own.
- Challenge Yourself: Take on an optional extra challenge to push your skills further.
# | Challenge | ES | Difficulty | Solution |
---|---|---|---|---|
01 | ✅ Return the Type | Easy | Solution | |
02 | ✅ Calculate the Tip | Easy | Solution | |
03 | ✅ Determine if a Year is a Leap Year | Easy | Solution | |
04 | ✅ Draw a Triangle Using Loops | Easy | Solution |
To run the unit tests you have provided, you need to follow these steps:
- Install pytest: If you do not have the
pytest
module installed, you will need to install it. You can do this using thepip
package manager. Open your terminal or command line and run:
pip install pytest
-
Organize your files: Make sure the file with the tests (the code snippet you provided) is saved in a file with the .py extension. For example, save it as test_exercise.py.
-
File location: Ensure that the exercise_01.py file (from which you import the found_type function) is in the same directory as your test file (test_exercise.py).
-
Run the tests: Open the terminal or command line and navigate to the directory where your files are located. Then, run the following command:
pytest test_exercise.py
This will run the tests defined in test_exercise.py and display the results in the console. If all tests pass successfully, you will see a message indicating that everything is fine. If any test fails, you will get detailed information about which test failed and how.