Questions
Questions

MCD4710 Introduction to Programming - Trimester 2 - 2025

Multiple dropdown selections

Fill in the blank with the correct option to complete the below given code:from abc Blank 1 Question 7[select: , from abstract import, using ABC, import ABC] , abstractmethodclass Employee(Blank 2 Question 7[select: , ABC, Base, Object] ): def __init__(self, name): self._name = name @abstractmethod def calculate_salary(self): Blank 3 Question 7[select: , pass, return 0, print("Not implemented")] class Developer(Employee): def __init__(self, name, hourly_rate, hours_worked): super().__init__(name) self._hourly_rate = hourly_rate self._hours_worked = hours_worked def calculate_salary(self): return self._hourly_rate * self._hours_worked

View Explanation

View Explanation

Verified Answer
Please login to view
Step-by-Step Analysis
The task asks us to fill in three blanks in the given Python code that uses abstract base classes (ABC). Blank 1: The line begins with from abc ___. The correct import statement to access ABC and @abstractmethod is: from abc import ABC, abstractmethod. However, since only one of the provided dropdown options is requested for Blank 1, the choice 'from abc import' is appropriate because it provides the module name needed before......Login to view full explanation

Log in for full answers

We've collected over 50,000 authentic exam questions and detailed explanations from around the globe. Log in now and get instant access to the answers!

Similar Questions

More Practical Tools for Students Powered by AI Study Helper

Join us and instantly unlock extensive past papers & exclusive solutions to get a head start on your studies!