title: python "class" word promblem
body: <p>The question reads</p>
  
  <p>Write a class named Car that has the following data attributes:</p>
  
  <p><code>__year_model</code>( for the car’s year model)</p>
  
  <p><code>__make</code>(for the car’s make of the car)</p>
  
  <p><code>__speed</code>( for the car’s current speed)</p>
  
  <p>The Car class should have a <code>__init__</code> method that accepts the car’s year model and make as arguments. It should also assign 0 to the <code>__speed</code> data attribute.</p>
  
  <p>The class should also have the following methods:</p>
  
  <p>•   Accelerate
  The accelerate method should add 5 to the speed data attribute each time it is called.</p>
  
  <p>•   Brake
  The brake method should subtract 5 from the speed data attribute each time it is called.</p>
  
  <p>•   The get_speed
  The get_speed method should return the current speed</p>
  
  <p>Next, Design a program that creates a car object, and then calls the accelerate method five times. After each call to the accelerate method, get the current speed of the car and display it. Then call the brake method five times. After each call to the brake method, get the current speed of the car and display it.</p>
  
  <p>I'm getting error <code>TypeError: __init__() missing 3 required positional arguments: 'year', 'make', and 'speed'</code></p>
  
  <p>my code:</p>
  
  <pre><code>#create class called car
  
  class Car:
      def __init__(self,year,make,speed):
          self.__year_model=year
          self.__make=make
          self.__speed=0
  
      #set the arguments for speed,year, and make
      def set_year_model(self,year):
          self.__year_model=year
  
      def set_make(self,make):
          self.__make=make
  
      def set_speed(self,speed):
          self.__speed=0
  
      #the returns for speed, year, and make
      def get_year_model(self):
          return self.__year_model
  
      def get_make(self):
          return self.__make
  
      def get_speed(self):
          return self.__speed
  
  
      #methods
      def accelerate(self):
          self.speed +=5
  
      def brake(self):
          self.speed-=5
  
      def get_speed(self):
          return self.speed
  
  #actuall program
  #create car object
  def main():
      my_car=Car()
  
      year=print(input('car year: '))
      make=print(input('car make: '))
      speed= print('Current speed is 0')
  
      #accelerate 5 times
  
      my_car.accelerate()
      print('My current speed:',my_car.get_speed())
      my_car.accelerate()
      print('My current speed:',my_car.get_speed())
      my_car.accelerate()
      print('My current speed:',my_car.get_speed())
      my_car.accelerate()
      print('My current speed:',my_car.get_speed())
      my_car.accelerate()
      print('My current speed:',my_car.get_speed())
  
      #brake five times
      my_car.brake()
      print('My current speed after brake:',my_car.get_speed())
      my_car.brake()
      print('My current speed after brake:',my_car.get_speed())
      my_car.brake()
      print('My current speed after brake:',my_car.get_speed())
      my_car.brake()
      print('My current speed after brake:',my_car.get_speed())
      my_car.brake()
      print('My current speed after brake:',my_car.get_speed())
  
  main()
  </code></pre>