Question: The following program first reads the status 'status', entered by the user, of a person who wants to register in a gym club, and keeps

 The following program first reads the status 'status', entered by the
user, of a person who wants to register in a gym club,
and keeps asking the user to reenter the status if the entered

The following program first reads the status 'status', entered by the user, of a person who wants to register in a gym club, and keeps asking the user to reenter the status if the entered gym status is not one of the following: y => Young, w => Working adult, n => Not-Working adult, o => Old. Then, it computes and displays the discounted price (to 2 decimals points) for a monthly registration in a gym club, according to the entered status. Assume the original price is OMR 150 for a monthly registration in a gym club and assume that the program processes the conditions in the following order. 5% discount if the user's status is Young 10% discount if the user's status is Working adult 15% discount if the user's status is Not-working adult 20% discount if the user's status is Old Write a program that copies all lines from a file "source.txt" into the file "destination.txt" try: f1 open("source.txt", "Y") text = f1.readline() try: while not eof: f2 = open("destination.txt","w") f2.write(text) if text == ""; eof = False finally: f1.closed f2 close eof= False finally: f1.close() f2.close except IOError: print("ERROR: No such file or directory") To answer the question, drag and drop the statements (below) to their correct position in the code (above). eof = True except ValueError: f2 = open("destination.txt","a")

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!