subject

Create a Python program that: Opens a file and reads the contents of the following file
trips. txt
The file contains several lines of data, with each data item separated by commas. The data is:
A trip date
The amount of fuel used on the trip
The number of miles traveled on the trip
For each of the lines of data in the file, separate the data items and put them in appropriate variables
The file contents are in the form of strings, so you must convert the numbers in the data into the proper type
Create a function that calculates the fuel mileage achieved on each trip
Pass the appropriate data to this function
Place this function in a separate module
Call the function as needed and have the function return the calculated fuel mileage
Create a function that displays the following items on a single line, and place the function in the same module as the previous function.
Pass the appropriate data to this function
Trip data
Amount of fuel used
Numbers of miles traveled
Fuel mileage calculated for the trip
Call the function as needed to display the data items
Create a new file to save the data read and the fuel mileage calculated for the trip
Write the data on separate lines for each trip in the data, with each item separated by commas
Remember that all of the data must be saved in the string form
The program should:
Use variables with meaningful names
Name the module containing the functions "SupportMod. py"
Import the module into your program
Display easily understood prompts when collecting user input
Prompt the user for the name of the file to read the data from, and the name of the file to store the revised data
Have appropriate comments indicating what each part of the program is doing
Have a comment area at the beginning of the program identifying the author of the program and the class it was created for
Can someone create a code that does this for me?
Sample data:
1-21-2019,12,243
1-23-2019,15.3,302.4
1-25-2019,10.9,209.3
1-31-2019,23.2,543.9
2-13-2019,15.3,409.3

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
How can a user open a blank presentation? 1.on the file menu, click new, and then click recent templates 2.on the file menu, click new, and then click blank presentation 3. on the view menu, click templates, and then click recent templates 4. on the view menu, click samples, and then click blank presentation
Answers: 1
question
Computers and Technology, 22.06.2019 17:00
Acase study allows a more detailed look at the life of a single subject than any other study.
Answers: 3
question
Computers and Technology, 23.06.2019 12:30
How is the brightness of oled of the diaplay is controled
Answers: 1
question
Computers and Technology, 24.06.2019 00:40
What social factors affect your health
Answers: 3
You know the right answer?
Create a Python program that: Opens a file and reads the contents of the following file
trips...
Questions
question
English, 14.11.2020 15:00
question
Mathematics, 14.11.2020 15:00
question
Mathematics, 14.11.2020 15:00
question
English, 14.11.2020 15:00
Questions on the website: 13722363