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, 23.06.2019 02:00
Which demographic challenge is europe currently experiencing? a. an aging and decreasing population b. a baby boomc. an unequal distribution between males and females d. a large group of teenagers moving through the school system(i chose a but i'm unsure)
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
What are the 12 colors of the spectrum called?
Answers: 1
question
Computers and Technology, 23.06.2019 18:20
What is wi-fi infrastructure? a metropolitan area network that uses radio signals to transmit and receive data a communications technology aimed at providing high-speed wireless data over metropolitan area networks a means by which portable devices can connect wirelessly to a local area network, using access points that send and receive data via radio waves includes the inner workings of a wi-fi service or utility, including the signal transmitters, towers, or poles and additional equipment required to send out a wi-fi signal
Answers: 2
question
Computers and Technology, 24.06.2019 09:10
  to change the number of rows and columns displayed by the excel object a. select the object and drag a size handle on the active object. b. deselect the object and drag a size handle of the object. c. deselect the object and drag a row or column divider of the object. d. select the object and drag a row or column divider on the active object.
Answers: 2
You know the right answer?
Create a Python program that: Opens a file and reads the contents of the following file
trips...
Questions
Questions on the website: 13722360