Q9Comprehension1.5 Marks13 Apr 2025
Passage
Based on the data below, answer the given subquestions.
Consider the following Employee class and its subclass Manager:
```
class Employee:
def __init__(self, name, salary):
self.name = name
self.salary = salary
def update_salary(self, new_salary):
self.salary = new_salary
def print_details(self):
print(f"Employee Name: {self.name}")
print(f"Salary: {self.salary}")
class Manager(Employee):
total_managers = 0
def __init__(self, name, salary, department):
super().__init__(name, salary)
self.department = department
Manager.total_managers += 1
def is_IT_department(self):
return self.department == "IT"
def print_details(self):
super().print_details()
print(f"Manager of Department: {self.department}")
```
If the below main code is executed after the class definition, what will be the output?
```
managers = [
Manager("Ramesh", 100000, "Marketing"),
Manager("Rathika", 120000, "IT"),
Manager("Anshu", 90000, "HR")
]
print(managers[0].total_managers)
```
Press Enter to check.