Docstring verwenden
Du hast die Klasse MortgageCalculator entwickelt. Ergänze jetzt eine Docstring, die die Attribute der Klasse erklärt.
Diese Übung ist Teil des Kurses
<Kurs>Fallstudie: Software in Python entwickeln</Kurs>Übungsanweisungen
- Füge für das Attribut
monthshinzu:the number of months in the loan. - Füge für das Attribut
monthly_paymenthinzu:the amount of the payment per month.
Interaktive praktische Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
class MortgageCalculator(FinancialCalculator):
"""
A class used to represent a mortgage calculator.
Attributes
-------
months: ____.
monthly_payment: ____.
"""
# Code omitted for space