Question: python Write the missing code: class Car: def __init__(self, color, mileage): self.color = color self.mileage = mileage def drive(self, miles): #1) missing code: drive method
python
Write the missing code:
class Car: def __init__(self, color, mileage): self.color = color self.mileage = mileage
def drive(self, miles): #1) missing code: drive method should increase the mileage
blue_car = Car("blue", 0) blue_car.drive(100) print(blue_car.mileage)
python
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
