prize17-7, Exercise 2: Two ways to count seven def accents(groups): out = [] for g in groups: out += ["X"] + ["."] * (g - 1) return " ".join(out) print("7/4 (2+2+3):", accents([2, 2, 3])) print("7/4 (3+2+2):", accents([3, 2, 2])) print("both have", sum([2, 2, 3]), "beats:", sum([3, 2, 2]) == sum([2, 2, 3])) Output (run and checked): 7/4 (2+2+3): X . X . X . . 7/4 (3+2+2): X . . X . X . both have 7 beats: True Why it works: each group puts an accent (X) on its first beat and dots on the rest, so the same seven beats feel different depending on where the accents fall. Summing the group sizes confirms both groupings make seven. Care: the last line compares the two sums; it prints True only when they match, so a typo in a group would show up.