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 19:00
The fourth generation of computers emerged between 1970s and 1980s. which technological advancement brought about this generation of computers? which computer architecture was used most in this generation?
Answers: 3
question
Computers and Technology, 23.06.2019 06:30
Martha is designing a single-player game. her manager suggests that she plan the design to incorporate future modifications. which principle of game design relates to planning for future modifications?
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Spoons are designed to be used for: spring hammering. applying body filler. identifying high and low spots. sanding highly formed areas.
Answers: 3
question
Computers and Technology, 24.06.2019 11:20
William travels a lot on business purpose. he needs to regularly communicate with his business partner. he also needs to send out weekly reports to his boss while he is traveling. which web-based application best suits william’s needs? (social media, webmail, wiki) is the best web-based application for william. he can access this application via the internet using a (digital cable, fax machine, web browser).
Answers: 1
You know the right answer?
Create a Python program that: Opens a file and reads the contents of the following file
trips...
Questions
question
Social Studies, 04.05.2021 22:40
question
Mathematics, 04.05.2021 22:40
question
Mathematics, 04.05.2021 22:40
question
Mathematics, 04.05.2021 22:40
question
Mathematics, 04.05.2021 22:40
question
Mathematics, 04.05.2021 22:50
Questions on the website: 13722361