LoslegenKostenlos starten

Using docstring

You've developed the MortgageCalculator class. Now, complete a docstring to provide explanations for the class's attributes.

Diese Übung ist Teil des Kurses

<Kurs>Case Study: Building Software in Python</Kurs>
Kurs ansehen

Übungsanweisungen

  • For the months attribute, add the number of months in the loan.
  • For the monthly_payment attribute, add 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
Code bearbeiten und ausführen