class Car:
# Initializting Attributes of Class Car
def __init__(self, color, brand, model):
self.color = color
self.brand = brand
self.model = model
def repaint(self, new_color):
self.color = new_color
# Creating Object called "MyCar" along with attributes
MyCar = Car("OrchidWhite", "Honda", "Amaze")
# Extracting Information from the "My Car" Object
print(f"My Car is a {MyCar.color} {MyCar.brand} {MyCar.model}")
# My Car Repatined with Metallic Blue
MyCar.repaint("MetallicBlue")
# Extracting Information from the "My Car" Object
print(f"After Repaint My Car is a {MyCar.color} {MyCar.brand} {MyCar.model}")
My Car is a OrchidWhite Honda Amaze
After Repaint My Car is a MetallicBlue Honda Amaze