Opposite Face of a Die
7/7
On a standard six-sided die, opposite faces always add up to 7: 1 is opposite 6, 2 is opposite 5, and 3 is opposite 4.
Once you spot an invariant like that, a lookup table or a chain of if statements turns into one line: 7 - n.
Logic-building habit: list the input/output pairs side by side and look for a relationship (sum, difference or ratio) before writing branches.