← back to unit
Easy
# puzzle gauntlet easy
The Handshake Party
Party tradition: every guest shakes hands with every other guest exactly once. How many handshakes? 🤝
You get the number of guests. Print the total handshakes. Simulate with two loops — then see if you can spot the formula hiding in your answer.
Example:
Input: guests = 4
Output: 6
The pairs are (1,2), (1,3), (1,4), (2,3), (2,4), (3,4) — 6 handshakes total.
💡 need a hint?
pg-handshake-party.py🔒 given lines are locked — write your code in between
loading...