Skip to content

Hackarm/tiny_python_projects

Repository files navigation

Playful Python

I believe you can learn serious things through silly games.

I'd like to make this into a book or something, similar to the Python bioinformatic/data science (https://github.com/kyclark/practical_python_for_data_science) repo. I think you will learn best by doing, so I think I will write this as a loose collection of exercises that spell out the skills I aim to teach with each exercise. I will create descriptions for each exercise with examples of how the program should work along with a test suite. You will need to write the program that satisfies the test suite.

I think I'm going to present this differently from other material in that I won't necessarily show you beforehand what you need to write a program. I'll describe what the program should do and provide some discussion about how to write it. I'll also create an appendix with short example of how to do things like read/write from/to a file, process all the files in a directory, extract k-mers from a string, etc. I'll provide some building blocks, but I want you to figure out how to put the pieces together!

new_py.py

I provide a program in the bin directory called new_py.py that will help you stub out new Python programs using the fabulous argparse module to parse the command line arguments and options for your programs. I highly recommend you start every new program with this. For example, if the README say "Write a Python program called abc.py that ...", then you should do this:

$ new_py.py -a abc

To create a new abc.py program that has example code for you to start writing your program.

Author

Ken Youens-Clark kyclark@gmail.com

About

Code for Tiny Python Projects (Manning, 2020, ISBN 1617297518). Learning Python through test-driven development of games and puzzles.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 96.4%
  • Shell 2.1%
  • Makefile 1.4%
  • Dockerfile 0.1%