Answered step by step
Verified Expert Solution
Question
1 Approved Answer
NEED IT UGENTLY During the holiday season, people often exchange gifts. A popular game played when exchanging gifts is Secret Santa. In this game, participants
NEED IT UGENTLY
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. [30 marks]
4. 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 doesn't end up buying a gift for themselves. [30 marks] 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 UsmanStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started