subject

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 = color('purple')

myCar. changeColor(self, 'purple')

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 19:30
Raveena is making a professional presentation for a newly launched product of her company. she wants to incorporate the following features in her presentation. a) to add serial numbers in each slide b) to add name of her company on top of each slide. c) to add the picture of her product on the second slide(the picture of her product is stored on her computer) write the commands/features of her presentation tool using which she can perform the above operations.
Answers: 2
question
Computers and Technology, 23.06.2019 16:30
Monica and her team have implemented is successfully in an organization. what factor leads to successful is implementation? good between different departments in an organization leads to successful is implementation.
Answers: 1
question
Computers and Technology, 23.06.2019 20:00
Match the file formats with the types of multimedia they can store
Answers: 2
question
Computers and Technology, 24.06.2019 13:30
Which of the following is not a “fatal four” event?
Answers: 2
You know the right answer?
Your program is below. class vehicle:
def __init__(self, strModel, strColor):
self. mo...
Questions
question
Biology, 25.12.2019 20:31
question
English, 25.12.2019 20:31
question
Arts, 25.12.2019 20:31
question
Geography, 25.12.2019 20:31
Questions on the website: 13722363