शुरू करेंमुफ़्त में शुरू करें

docstring का उपयोग

आपने MortgageCalculator क्लास विकसित कर ली है। अब, क्लास के attributes के लिए व्याख्या देने हेतु एक docstring पूरी कीजिए.

यह अभ्यास पाठ्यक्रम का हिस्सा है

केस स्टडी: Python में सॉफ्टवेयर बनाना

पाठ्यक्रम देखें

अभ्यास निर्देश

  • months attribute के लिए the number of months in the loan जोड़ें.
  • monthly_payment attribute के लिए the amount of the payment per month जोड़ें.

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

class MortgageCalculator(FinancialCalculator):

  """
  A class used to represent a mortgage calculator.

  Attributes
  -------
  months: ____.
  monthly_payment: ____.
  """
  # Code omitted for space
कोड संपादित करें और चलाएँ