Python Koans: Learn Python Programming By Making Tests Pass

CurrentThing

New Lister
Python Koans is an interactive tutorial for learning the Python programming language by making tests pass.

Most tests are fixed by filling the missing parts of assert functions. Eg:
self.assertEqual(__, 1+2)
which can be fixed by replacing the __ part with the appropriate code:
self.assertEqual(3, 1+2)
Occasionally you will encounter some failing tests that are already filled out. In these cases you will need to finish implementing some code to progress. For example, there is an exercise for writing some code that will tell you if a triangle is equilateral, isosceles or scalene.

As well as being a great way to learn some Python, it is also a good way to get a taste of Test Driven Development (TDD).

 
Top