Week 16 • Tuesday

Block 154: Code Documentation & Docstrings

Add comprehensive docstrings and inline comments.

Concepts

Code Examples

See exercise below.

Exercise

Add complete docstrings to every function in your project (what it does, parameters, returns, raises). Add type hints to at least 5 functions.

Homework

What is the difference between a docstring and an inline comment? Give an example of each used correctly. Wednesday