← back to unit
Medium
# power tools medium
Who Has the Most Badges?
Every time a scout earns a badge, their name goes in the log — one name per badge. 🎖️
You get the badge log as a list of names (one scout is strictly ahead). Print who has the most badges.
Example:
Input: log = ["ana", "raj", "ana", "liv", "raj", "ana"]
Output: ana
Tallying gives ana=3, raj=2, liv=1 — ana has the most badges.
💡 need a hint?
pt-most-badges.py🔒 given lines are locked — write your code in between
loading...