Copyleft Games

Intro to Python documentation (fire truck)

Documentation is vitally important for every software project. In this beginner task you'll demonstrate that you've learned to document a small Python class to describe a fire truck:

class FireTruck (Vehicle):
    def __init__(self, volume):
        self.volume = volume

    @property
    def volume(self):
        return self._volume

    @property.setter
    def volume(self, value):
        self._volume = value

Add a concise description for both the class and the volume property, and use annotations to specify that volume should be a float value. If you're unfamiliar with Python you may need to research how to do this or ask for guidance in our webchat.

Submit the above class with your added annotations and documentation when you're done.

Task tags

  • pydoc

Students who completed this task

azure

Task type

  • chrome_reader_mode Documentation / Training

Level

Beginner
close

2019