Boss Challenge 3.2.2
Diving App – 8XP
Create an app to score the dives in the Games.
Determine the IPO, design a flowchart algorithm and create/test the Python code.
Save as diving_app.py
Scenario
Each of the seven judges score dives out of 10 and the athlete with the highest total is the winner. The two highest and two lowest scores are discarded, and the remaining three scores are added together and multiplied by the difficulty tariff (of which there are five levels) to give a final score.

Judges score in whole or half points along the following lines:
- Completely failed — 0 points
- Satisfactory — 5 to 6 points
- Good — 6.5 to 8 points
- Very good — 8.5 to 10 points
Degree of dive difficulty (tariff)
The degree of difficulty is a numerical value given to a dive, which is multiplied by a judge’s score of a dive. The degree of difficulty is based on a formula that adds together the different components of a dive. Obviously, the more moves attempted in a dive, the greater the tariff and therefore the greater the potential for scoring more points. However, with this comes the potential for more going wrong!
The degree of difficulty ranges from 1.2 to 3.6. (see www.usadiver.com/dd_table.htm)
For example
Dive #403B has degree of difficulty (DD) of 3.5 (reverse three-and-a-half somersault tuck – the highest)
Scores: scores=[7.5, 7.5, 8.0, 8.0, 8.5, 8.0, 7.0].
What would this score be?
Sort scores -> [7.0, 7.5, 7.5, 8.0, 8.0, 8.0, 8.5]
Remove top 2 and bottom 2 -> [7.5, 8.0, 8.0]
DiveScore: Sumscores * dod -> (7.5 + 8.0 + 8.0) * 3.5 = 82.25