class Car: def __init__(self, color, make, model, speed, owner): self.color = color self.make = make self.model = model self.speed = speed self.owner = owner def accelerate(self): self.speed = self.speed + 5 def stop(self): self.speed = 0 def __repr__(self): return self.owner + ' owns a ' + self.color + ' ' + self.make + ' ' + \ self.model + ' traveling at ' + self.speed.__str__() + ' mph' '''# Activity part one - Read in all of the data, make car objects and put them in a list # Open the input file # Declare an empty list called carList # Finish the for loop to iterate input.txt line by line for (color,make,model,speed,owner) = line.split() # Creat a new car using the parameters from the variables declared abvoe # Append the car you made to carList print(carList) # What must we always do when we're done with a file?''' '''# Activity part two - Find the fastest car topSpeed = 0 # Finish looping over every car in carList for # Complete the if check to see if this car is faster than the previous fastest if # Set topSpeed equal to the speed of the current car print("The fastest car is moving at: " + str(topSpeed) + " mph")''' '''# Activity part three - Accelerate every car, then stop all cars going over 15 mph # Finish looping over every car in carList for # Call .accelerate() on this car print(carList) names = "" # Finish looping over every car in carList for # Complete the if statement to check if the car is going over 15 mph if # Stop the car # Finish this statement to add the name of the owner to our list names += .owner + ' ' print(names + " was stopped!")'''