UCL-MPHY0021-21-22 / RSE-Classwork

7 stars 73 forks source link

Using docstrings and doctests #23

Open dpshelio opened 3 years ago

dpshelio commented 3 years ago

This exercise will show why it is important to keep documentation accurate, and how to do this automatically using docstrings and doctests.

Setup

Understanding

Exercises

As you may have discovered, the code in squares.py does contain some mistakes. Thankfully the functions in the file include documentation that explains how they should behave.

Run the doctests

Update the docstrings

Correct the code and verify

Repeat the process for convert_numbers

Submit a Pull Request

Once you have completed or made progress on the exercises