Question: * WRITE THE CODE IN PYTHON LANGUAGE During the holiday season, people often exchange gifts. A popular game played when exchanging gifts is Secret Santa.
* WRITE THE CODE IN PYTHON LANGUAGE
During the holiday season, people often exchange gifts. A popular game played when exchanging gifts is Secret Santa. In this game, participants enter in their names and each person is randomly assigned another participant to buy a gift for. Write a python program that allows the user to enter names of their friends until they enter x. The program should output random Secret Santa assignments. Make sure a person doesnt end up buying a gift for themselves.
Sample input: Enter name (x to generate assignments): Usman
Enter name (x to generate assignments): Wahid
Enter name (x to generate assignments): Zain
Enter name (x to generate assignments): Jagraj
Enter name (x to generate assignments): x
Sample output: Usman gifts Zain
Zain gifts Wahid
Wahid gifts Jagraj
Jagraj gifts Usman
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
