I read a lot of car classes on several sites and still can't get mine to work. Any ideas?
##Car class
class Car:
def __init__(self, y_model, make, speed):
self.y_model = y_model
self.make = make
self.speed = speed
def set_year_model(self, y_model):
self.y_model = y_model
def set_make(self, make):
self.make = make
def get_year_mod(self):
return self.y_model
def get_make(self):
return self.make
def accelerate(self, speed):
self.speed += 5
def brake(self, speed):
self.speed -= 5
def get_speed(self):
return self.speed
##Car
import car
def main():
my_car = car.Car(mod, ekam, speed)
mod = raw_input('What year is your car')
ekam = raw_input('What is the make of your car')
print my_car.get_year_mod()
print my_car.get_make()
speed = 0
print my_car.accelerate(speed)
print my_car.brake(speed)
main()