MulaiMulai sekarang secara gratis

Creating a Manufacturing Company

In the final exercise of this lesson, you'll create an updated version of the Company abstract base class before creating a Manufacturing company. The ABC class and abstractmethod decorators have been imported from abc for you. Good luck!

Latihan ini adalah bagian dari kursus

Intermediate Object-Oriented Programming in Python

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Define a Company abstract base class with a pay_taxes() method
____ ____(____):
  ____
  ____ ____(self):
    pass
  
  def report_revenue(self):
    print(f"{self.name} is reporting ${self.revenue} of revenue")
Edit dan Jalankan Kode