Question
PYTHON: Create a new class, in my_classes.py, called ElectricScooter. Add a constructor called __init__ that initializes the following properties: id, name, price, color and run_time.
PYTHON:
Create a new class, in my_classes.py, called ElectricScooter. Add a constructor called __init__ that initializes the following properties: id, name, price, color and run_time. Add a __str__ method that returns the id, name, color, run_time and price. Write a load_scooters function (in my_functions.py) that takes nothing and returns a dictionary of scooters (id as key, ElectricScooter object as value). Create at least 4 scooters. Write a program in problem3.py that calls the load_scooters method to get the dictionary of accessories, then loop through the dictionary with for loop to print them out.
Sample run: Electric Scooter: number: 1 name: E Prime Electric Scooter color: Silver run time:30 price $379.99 Electric Scooter: number: 2 name: Power A2 Electric Scooter color: Silver run time:40 price $199.99 Electric Scooter: number: 3 name: E300 Electric Scooter color: Blue run time:40 price $279.99 Electric Scooter: number: 4 name: RX200 Electric Scooter color: Green run time:40 price $269.99
A GAdd Configuration... CSCI100 Lab8_Pmy classes.py Project myclasses.pymy functions.py problem1pyproblem2-pyxproblem3.pyproblem4.py problem5.py x cSCI100 Lab8 P /Dropbox/UM 1 my_classes.py my_functions.py problem1.py problem2. py problem3.py r. problem4. ~' problemS. il External Libraries Scratches and ConsolesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started