Track 13 · Lesson 10 of 12
Readable code
Write code people can understand and change: clear names, small functions, named constants, no duplication, useful docstrings and PEP 8 layout.
You will be able to
- Choose names that say what a value holds or what a function does
- Replace magic numbers with named constants
- Split a function that does several jobs into small functions with one job each
- Write docstrings that explain what a function does, and comments that explain why
- Follow the basic PEP 8 layout conventions
Included with a Formula Quest membership
It has 3 graded exercises with feedback, hints and solutions. Python Quest is included in Formula Quest memberships that cover Python; membership and billing are managed on Formula Quest.
View Formula Quest memberships
Tracks 1 and 2, the first lesson of every track, the playground and the dataset library are free.