← back to unit
Medium
# searching medium
Highest Score That's Still a Fail
The arcade machine taunts you with the closest miss: the top score that still didn't reach the prize line. 🕹️
You get a list of scores and the passmark. Print the highest score that is BELOW the passmark, or none if every score passed.
Example:
Input: scores = [80, 95, 70, 99], passmark = 90
Output: 80
95 and 99 passed, so they're disqualified. Among the failing scores (80, 70), the highest is 80.
💡 need a hint?
srch-highest-fail.py🔒 given lines are locked — write your code in between
loading...