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
Calculate the fuel mileage achieved on each trip
Display on a single line the:
Trip data
Amount of fuel used
Numbers of miles traveled
Fuel mileage calculated for the trip
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

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:00
What computer network component allows data transfers from one computer to another through a telephone line?
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
Primary tech skills are skills that are necessary for success in online education
Answers: 3
question
Computers and Technology, 22.06.2019 20:00
What is used to analyze and summarize your data without graphical support
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
What are some ways to use a range name in a formula? check all that apply. in the defined names group, click use in formula, and then select the desired name. begin typing the name in the formula, select a name from the autocomplete list, and use the arrow keys and tab key to enter the name in the formula. begin typing the formula, and then click and drag with the mouse to select the cells to include in the formula. right-click one of the cells in the range. click formula options, and use the dialog box to add the name.
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
Mathematics, 18.10.2021 18:40
question
Mathematics, 18.10.2021 18:40