CODE a class called Motor that describes a motor of a programmable…

Question Answered step-by-step CODE a class called Motor that describes a motor of a programmable… CODE a class called Motor that describes a motor of a programmable robot. The class has the following instance attributes:port describes to which port of the robot’s hub the motor is connected; possible values are characters A through F which should be entered when creating an object. (1 point)direction describes whether the motor turns clockwise (1) or counter-clockwise (0); it is a private attribute and has a default value of 1. (1 point)speed describes the number of rotations per second; it is a private attribute and has a default value of 0.5. (1 point)The class also has a class attribute number_of_motors that counts how many motors are connected to the robot. (1 point)The class has the following methods:set_speed that sets the rotational speed of the motor in rotations/second (2 points)set_direction that sets the direction in which the motor turns (enter 1 or 0) (2 points)show_properties that prints the values of all instance attributes and the class attribute of the object. (2 points)using OOP   Computer Science Engineering & Technology Python Programming ENG PFE610S Share QuestionEmailCopy link Comments (0)