Computer Science, asked by skazimi1726, 1 month ago

car = BlueCar('blue','volvo');
car.honk();

Answers

Answered by jai696
4

\huge\red{\mid{\fbox{\tt{Using\: Python\: 3}}\mid}}

class Car:

def __init__(self, colour, brand):

self.colour = colour

self.brand = brand

def honk(self):

print("Beep beep!")

car = Car("blue", "volvo")

car.honk()

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Answered by Japji21
0

Answer:

class Car:

def __init__(self, colour, brand):

self.colour = colour

self.brand = brand

def honk(self):

print("Beep beep!")

car = Car("blue", "volvo")

car.honk()

Similar questions