Copyleft Games

Intro to Python documentation (snowman)

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 snowman:

class Snowman:
    def __init__(self, rank, height):
        self._height = height
        self._rank = rank

    @property
    def height(self):
        return self._height

    @property
    def rank(self):
        return self._rank

Add a concise description for both the class and the two read-only properties, and use annotations to specify that rank is an integer and height a float in meters. 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

mugiwala

Task type

  • chrome_reader_mode Documentation / Training

Level

Beginner
close

2019