Modifying Object Properties
Mon 10 August 2026
class Employee:
def __init__(self, name):
self.name = name
emp = Employee("John")
emp.name = "Michael"
print(emp.name)
Michael
Score: 10
Category: chapter1_oop_basics
class Employee:
def __init__(self, name):
self.name = name
emp = Employee("John")
emp.name = "Michael"
print(emp.name)
Michael
Score: 10
Category: chapter1_oop_basics