Answered step by step
Verified Expert Solution
Link Copied!

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:

image text in transcribedmake 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

3. Are our bosses always right? If not, what should we do?

Answered: 1 week ago