Challenge #344: World Cup Sweepstakes (Part 1)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
A solution to last week’s challenge can be found here.
Are you new to the wonderful world of sweepstakes?
In a traditional FIFA World Cup sweepstakes, the names of the 32 finalist nations are put into a hat. Friends, family, or work colleagues then pick team names out at random before the tournament begins. Participants can pay a sum of money for each team name they take out of the hat.
The person who picks out the eventual World Cup winner wins the accumulated prize money. It is a simple lottery, which gives World Cup viewers another team to cheer on and adds a bit of competitive fun as the tournament progresses.
There are variations of the sweepstakes format, where you could offer consolation prizes to participants; for example, to the person who picked out the tournament runner-up or the person who had the worst performing team.
For this challenge, you will draw FIFA World Cup teams for your office sweepstakes. You have some data on the teams taking part, which group they are in for the tournament, and their current world ranking but unfortunately you do not know how many people will take part in your sweepstakes.
Build a workflow that will take any number of names (up to 32) and randomly match them with teams participating in the World Cup for your office sweepstakes draw. Your output will not match the one given (as it should be randomized) but the format should be the same—with each of the five people receiving six teams at random.
Build in logic that makes the draw more fair, by ensuring that each person draws at least one of the top-ranked teams.
NOTE: This is Part 1 of 2. Hold off on drawing your sweepstakes winners until next week when we will create an output for the participants.
Good luck with the draw and don’t forget to come back next week for Part 2!
- Labels:
- Core
- Intermediate
- Join
- Parse
- Preparation
- Transform
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Have made a few randomisers before so this one is nice! Missed the top team condition at first
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Tried to make this as dynamic as possible so all that would need to be changed for different number of players is the names text input.
My solution:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Fun challenge which I solved with an Iterative Macro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Great challenge - mine is dynamic to make sure the amount of names get assigned a top team (i.e. 5 people means top 5 teams). Curious to see others' solutions!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
If you want to wage a bet on sports, you'll have a random assignment. This is the only way to be fair, otherwise my interpretation of which teams are top ranked influences your chance of winning.
Here's my take
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator