Files changed (1)
-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 [[http://www.agiledata.org/essays/tdd.html|Test Driven Development (TDD)]].
-Aside from downloading or checking out the latest version of Python Koans, all you need to install is Python.
-At this time of writing there are two versions of the koans, one for use with Python 2.6 and one for Python 3.1. You should be able to work with newer Python versions, but older ones will likely give you problems.
-On installing Python make sure the folder containing the python executable is in the system path. In other words, you need to be able to be able to run Python from a command console. With Python 2 it will be called **python** or **python.exe** depending on the operating system. For Python 3 it will either be **python3** or for windows it will be **python.exe**.
-From a *nix terminal or windows command prompt go to the python koans\python_**~<<version no~>>** folder and run:
-It also tells me exactly where the problem in, its an **assert** on line 12 of **.\koans\about_asserts.py**. This one is easy, just change False to True to make the test pass.
-Sooner or later you will likely encounter tests where you are not sure what the expected value should be. For example:
-This is where the Python Command Line can come in handy. in this case I can fire up the command line, recreate the scenario and run queries:
-Quoting the [[http://github.com/edgecase/ruby_koans/blob/master/README.rdoc|Ruby Koans instructions]]:
-//"In test-driven development the mantra has always been, red, green, refactor. Write a failing test and run it (red), make the test pass (green), then refactor it (that is look at the code and see if you can make it any better. In this case you will need to run the koan and see it fail (red), make the test pass (green), then take a moment and reflect upon the test to see what it is teaching you and improve the code to better communicate its intent (refactor)."//
-Python is a made up of about 2/3 [[http://github.com/edgecase/ruby_koans|Ruby Koans]] ported material and 1/3 Python specific tests. The content ported from Ruby Koans includes all the assignment projects.
-Content for Python 3 is a little different to the Python 2 flavor due to big changes between the 2 different languages. For example in the Python 2 variant the differences between old and new style classes are covered. This loses relevance in in the Python 3 version, but there are some extra tests covering new functionality.
-Right now there are a lot of spinoff Koan projects out there for a great number of languages and frameworks. Many of them do not have that much content, but contributing to them is a great way to learn. At the moment most of them can be found by searching for 'koans' on [[https://github.com/|github]].
-A couple of promising projects include [[http://github.com/CoryFoy/DotNetKoans|DotNetKoans]] and [[http://github.com/ghendry/TestMongoKoans/|TestMongoKoans]]
-Thanks go to Jim Weirich and Joe O'Brien for the original [[http://github.com/edgecase/ruby_koans|Ruby Koans]] that Python Koans is based on! Also the Ruby Koans in turn borrows from [[http://www.rubyquiz.com/quiz67.html|Metakoans]] so thanks also go to Ara Howard for that!
-Also thanks to everyone who helped with the Python Koans conversion! In particular I got a great headstart on the project by forking from this Python Koans startup project: