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.
Interactieve oefening met praktijkervaring
Probeer deze oefening door deze voorbeeldcode aan te vullen.
class MortgageCalculator(FinancialCalculator):
"""
A class used to represent a mortgage calculator.
Attributes
-------
months: ____.
monthly_payment: ____.
"""
# Code omitted for space