← back to unit
Medium
# searching medium
Is Someone Cheating?
The high-score board maxes out at top points — a score above that is impossible! 🎮
You get the top possible score and a list of submitted scores. Print cheater alert if any score is above the top, otherwise all fair.
Example:
Input: top = 100, scores = [88, 95, 100]
Output: all fair
Nothing exceeds 100, so the cheating flag never trips.
Input: top = 100, scores = [60, 101, 40]
Output: cheater alert
101 is above the top — the moment it's seen, the flag flips to cheater alert.
💡 need a hint?
srch-someone-cheating.py🔒 given lines are locked — write your code in between
loading...