Date: Mon 14 December 2020 13:35:49 CET
Author: Nicolas Flandrois
Licence: MIT License - Copyright (c) 2020 - Nicolas Flandrois
cf 'The indisputable existence of Santa Claus' by Dr Hannah Fry, Chapter 4 'Secret Santa' (p.46 to 54; ISBN 9781784162740). This exercice tends to define a Random Hat Picking assignment of a Secret Santa, to another participant.
In this short exercice, we just simply create a pool, according to the number of participants, a randomly paired number ID with some other number ID. Then a pair is Randomly pulled out of the Bag (Pool list), and printed to the screen.
That way each Santa is randomly assigned to a participant.
Outcome of secretsanta.py
In a real life situation, we should print out the Secret Santa Pairing list, cut the different strips of pairs. People picks in a sorting hat. Then We just list Who they are (not who they offer to), either right after sorting their pairs, or right before opening presents (Adding a bit of mistery).
Outcome of secretSantaEmail.py
As it is all managed and randomised by a computer, we could create a script with names assignements. Same random pairing script, then email/sms each pairs to the concerned secret santa, leaving no traces.
- Xmas count down.