Question: Answer the questions Programming Problem 9: A Trophy to Remember Program: atrophy.py Mohamed Abd El-Wahab (known as the Coach) the chief judge of Oman Collegiate
Answer the questions

Programming
Problem 9: A Trophy to Remember Program: atrophy.py Mohamed Abd El-Wahab (known as the Coach) the chief judge of Oman Collegiate Programming Contest (OCPC) 2016, and Nicole Hosh (a judge in OCPC) were planning for the Contest and trying to figure out a unique way for who among the contestants will carry the trophy while entering the contest hall. Nicole suggested the following method: The contestants will stand in a queue. Nicole will repeat this process: At each step, she would compare between the first and the last person standing in the queue, choose the taller one, and put him in the front of the queue and the shorter one enters the contest hall. After many times there will be one contestant left, that contestant will carry the trophy and enter the contest hall with it. Given an array that contains the heights of the contestants (in inches), can you output the height of the last contestant that will enter the contest hall carrying the trophy? Write a Python program named atrophy.py that reads from the standard input the number of con- testants that will stand in the queue. The program should then ask the user to enter the heights of these contestants and store them in a list. Last, your program should display the height of the contestant that will carry the trophy. The output of your program should be exactly as shown in the following sample output. Enter the number of contestants in queue: 5 Enter the heights of the 5 contestants (in inches): 22 75 26 45 74 The hieght of the contestant is 75 inches. Sample Output 2 Enter the number of contestants in queue: 7 Enter the heights of the 7 contestants (in inches): 81 47 29 97 2 75 25 The hieght of the contestant is 97 inches. Add the following comments to the beginning of your atrophy.py. # FileName atrophy.py # Student Name:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
