119k views
4 votes
Your program is below.

class vehicle:
def __init__(self,strModel,strColor):
self.model = strModel
self.color = strColor

def __str__(self):
return self.model + ' ' + self.color

def changeColor(self,strColor):
self.color = strColor

myCar = vehicle('SUV','red')

What line of code will change the color of myCar to purple?

myCar.changeColor('purple')
myCar.changeColor = 'purple'
myCar.changeColor(self, 'purple')
myCar = color('purple')

User Andrene
by
9.0k points

1 Answer

7 votes

Answer:

What is this

Step-by-step explanation:

it's confusinggg

User Mark McClure
by
8.3k points