Docstring gebruiken
Je hebt de klasse MortgageCalculator ontwikkeld. Vul nu een docstring aan om uitleg te geven over de attributen van de klasse.
Deze oefening maakt deel uit van de cursus
Casestudy: Software bouwen in Python
Oefeninstructies
- Voeg voor het attribuut
monthstoe:the number of months in the loan. - Voeg voor het attribuut
monthly_paymenttoe:the amount of the payment per month.
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
class MortgageCalculator(FinancialCalculator):
"""
A class used to represent a mortgage calculator.
Attributes
-------
months: ____.
monthly_payment: ____.
"""
# Code omitted for space