Welcome to the Python Basics Project! In this project, you will practice working with user inputs, variables, data types, data structures, if/else statements, and for/while loops.
-
Fork the Repository:
- Click the "Fork" button on the top right of this repository to create your own copy.
-
Clone Your Fork:
- Clone your forked repository to your local machine:
git clone https://github.com/YOUR_USERNAME/Python-101.git
- Clone your forked repository to your local machine:
-
Create a Branch:
- Create a branch with your name (e.g.,
Monwabisi):git checkout -b YOUR_NAME
- Create a branch with your name (e.g.,
-
Complete the Tasks:
- Open
tasks.pyand implement the functions as described in the docstrings. - Test your implementation using the provided unit tests.
- Open
-
Run the Tests:
- Install
pytestif you don't have it:pip install pytest
- Run the tests:
pytest test_tasks.py
- Install
-
Commit and Push Your Changes:
- Add your changes:
git add tasks.py
- Commit your changes:
git commit -m "Completed tasks" - Push your changes to your branch:
git push origin YOUR_NAME
- Add your changes:
-
Submit a Pull Request:
- Go to your forked repository on GitHub and click "New Pull Request".
- Select your branch (
YOUR_NAME) and submit the pull request to the main repository.
- Ask the user for their name, age, and favorite color.
- Return a dictionary with the collected information.
- Calculate the Body Mass Index (BMI) using weight and height.
- Return the BMI rounded to 2 decimal places.
- Create a shopping list from a list of items.
- Return a dictionary with items as keys and quantities as values.
- Count the frequency of each word in a string.
- Return a dictionary with words as keys and frequencies as values.
- Check if a number is positive, negative, or zero.
- Return the appropriate string.
- Sum all even numbers in a list.
- Return the sum.
- Find the first negative number in a list.
- Return the first negative number or
Noneif there are no negative numbers.
- Analyze a string to count the number of words and vowels.
- Return a dictionary with the results.
To run the tests, use the following command:
pytest test_tasks.py