- 3 Design A Python3 Race Car Class Where That Vehicle Has The Following Attributes Type Sports Street Muscle Supe 1 (75.71 KiB) Viewed 43 times
3. Design a Python3 'Race Car class, where that vehicle has the following attributes: type (sports, street, muscle, supe
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
3. Design a Python3 'Race Car class, where that vehicle has the following attributes: type (sports, street, muscle, supe
3. Design a Python3 'Race Car class, where that vehicle has the following attributes: type (sports, street, muscle, super, hyper), acceleration value (float value between 1000.0- 10000.0), top speed (float value between 1000.0-10000.0), and nitro (float value between 1000.0-10000.0), color (a string value), year, number of doors (integer between 2-4), speed (initially 0). And the following methods; accelerate (accelerates the car speed by 10 in each call but not more than the top speed), break (decreases the speed by 10 in each call but now lower than 0) turn left, turn right, reverse. For the last 3 methods you can give an output such as 'Turning left..', 'Turning right... etc.