Using docstring
You've developed the MortgageCalculator
class. Now, complete a docstring to provide explanations for the class's attributes.
This exercise is part of the course
Case Study: Building Software in Python
Exercise instructions
- For the
months
attribute, addthe number of months in the loan
. - For the
monthly_payment
attribute, addthe amount of the payment per month
.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
class MortgageCalculator(FinancialCalculator):
"""
A class used to represent a mortgage calculator.
Attributes
-------
months: ____.
monthly_payment: ____.
"""
# Code omitted for space