Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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:
make 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("rnStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started