Question: Create a python application that will store your mileage record. based off this code: make sure that the application does the following things: 1. open

Create a python application that will store your mileage record. based off this code:

Create a python application that will store your mileage record. based offmake sure that the application does the following things:

1. open the file

2. prompt the user for their mileage

3. keep the file open as long as the user is adding data

4. when the user is done, close the file, then re-open it to read, and print out

the total mileage

fh-open ("myMileage.txt", "w" addDataTrue fh.write("Mileage Record In" while addData: myDatainput("What's your mileage (zero to quit)? ") if myData"o" print ("all done" addDataFalse fh.close() else: print ("adding data") fh.write(str (myData)) fh.write("rn

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!