This repository contains a series of exercises to help you refresh your Python knowledge. It's intended to be used as a companion to the Python Refresher Course.
First, clone this repository:
git clone https://github.com/tecladocode/python-refresher-exercises
Then, open the repository with your editor of choice (I recommend Visual Studio Code).
You'll find a few folders, one per exercise. Each folder contains a README.md
file with the instructions for the exercise, a student.py
file with some starter code, and a tests.py
file with some tests.
For example, for exercise 1, open 01_variables/README.md
and read the instructions.
Then:
- Rename
01_variables/exercise.py
to01_variables/solution.py
. - Rename
01_variables/student.py
to01_variables/exercise.py
. - Attempt your solution in the new
exercise.py
file.
Once you're ready, run the tests by going into the folder and running unittest:
cd 01_variables
python -m unittest
You should see OK
printed out, and that means it's all good!
If you want to check the instructor's solution, that's in the old exercise.py
(now called solution.py
) file.