This repository contains the exercises from https://github.com/exercism/python providing small and well-defined problems complete with tests and solutions.
The excercises are mostly unchanged, this repo exists only to make using them as straightforward as possible. You don't need to install anything other than Python.
-
Browse through the folders and read the description until you find an exercise you like to solve. Let's say you select
hello-world
. -
Clone the repository
git clone [email protected]:Alexander-N/python-exercises.git
Alternatively you can download the code from https://github.com/Alexander-N/python-exercises/archive/master.zip
-
Change into the directory of your exercise
cd python-exercises/hello-world
-
Edit
hello_world.py
to solve the exercise. Look at README.md and test.py to find out what to do. -
Run the tests with
python3 test.py
It is also possible to run a specific test, e.g.
python3 test.py HelloWorldTests.test_hello
-
Compare your solution to the one in
solution.py
-
You can make a pull request to share your solution.