1. Home >
  2. Apps >
  3. Groups >

What is Koans in python?

Question asked by Karshil Sheth in #Python on Feb 15, 2020
Karshil Sheth
Karshil Sheth · Feb 15, 2020
Rank C2 - EXPERT

I came across this term in python but didn't really know the meaning of it. Is it a library or any application programming interface or something else. Is it useful for development or for testing or not?

Please try to give answer the exact meaning of Koans and also an example to understand.

Posted in: #Python
Noothan Kumar
Noothan Kumar · Feb 15, 2020
Rank C1 - EXPERT

Checkout [Python koans](gregmalcolm/python_koans). To learn the concepts of python (koans), you have to setup the python interpreter, and a test framework. Then you run the tests and see tests fail.

For the tests to pass, you need to fix the code. To fix them, you need to earn a bit of python.

The code base is split into modules and you learn concepts categorised under each module. When all modules are done fixing, you would have learnt python.

You also learn test driven development and start using TDD from day one, a great way to code.

That's the closest you get to learn python in a nutshell.

Venkat Sai Nakkina
Venkat Sai Nakkina · Apr 5, 2020
Rank C3 - EXPERT

Python Koans is an interactive tutorial for learning the Python programming language by making tests pass. Occasionally you will encounter some failing tests. It uses a test-driven approach to provide an interactive tutorial teaching basic Python concepts. By fixing assertion statements that fail in a test script, this provides sequential steps to learning Python.

For those used to languages and figuring out puzzles on their own, this can be a fun, attractive option. 

For those new to Python and programming, having an additional resource or reference will be helpful.

You must log-in or sign-up to reply to this post.

Click to Log-In or Sign-Up