for this daily challange, I’m suspecting that the test cases are buggy, specifically the first one is wrong, if anyone else is facing this problem or solved it without cheating the tests, please leave a comment ![]()
Your code so far
def get_semifinal_matchups(teams):
scores = []
for team in teams:
name, record = team.split(":")
points = record.split("-")
scores.append((name,int(points[0]) * 3 + int(points[1]) * 2 + int(points[2]) * -1))
scores.sort(key=lambda item: item[1], reverse=True)
result = f"The semi-final games will be {scores[0][0]} vs {scores[3][0]} and {scores[1][0]} vs {scores[2][0]}."
return result
Challenge Information:
Daily Coding Challenge - 2026 Winter Games Day 11: Ice Hockey
https://www.freecodecamp.org/learn/daily-coding-challenge/2026-02-16