Croissant Monster and the Plastic King

Croissant Monster and the Plastic King

Code Solutions on GitHub β†—

 

 

Croissant Monster and the Plastic King

Flour flying everywhere around us, it feels like it is snowing in the bakehouse. And the way it smells; it reminds me of the pre-Christmas odors like ginger, cinnamon, cloves and dry oranges.

But it is already January, more precisely 6th January, and we are celebrating Twelfth Day. That is why we are baking our very own traditional big King Cake, which consist of a wreath of 17 bread rolls. In only one of the bread rolls, there is a white small plastic King. Whoever picks that bread roll, gets to wear the cardboard crown and feel like a King or Queen. The croissant monster and me hustle to bake the King Cake, while we are both squinting at the TV showing a famous old school 70s quiz show. And while we are busy mixing flour, butter, sugar and everything else, we both whish we would win the main prize of the quiz show, which is a car, whereas the consolation prize is a goat. While I wish for my favorite car, which is a mint green, pastel colored beetle, the croissant monster hopes for a fairytale like gingerbread car to drive around the bakery and breakfast room instead.

To my surprise, somebody just won the main price of a car in the retro TV show, and I glanced at the TV screen in astonishment. The croissant monster of course took the opportunity to place the plastic king in one of the bread rolls, without me seeing which one.

After baking it, the croissant monster and me decided to play each other for the mighty cardboard crown. I will win the crown if I know the answer to the following question. If I won’t know the correct answer, the croissant monster wins the crown. The croissant monster, who knows where the plastic king is hidden, asks me to guess in which of the 17 bread rolls the king is hidden. When I pick a bread roll, he takes away another bread roll without the king in it. Next round, we do the same: I pick another bread roll (not the same as before), and the croissant monster once again takes away another bread roll without the king in it. And the rounds continue like this.

Question: How many rounds do have to pass for me to have at least a 50 % chance to have the king in my picked bread roll, with the condition that I keep switching between the remaining bread rolls?

Code wisely, so you will win the crown and can continue to watch the Quizz Show as the newly crowned Queen or King. Take a Guess.

Non-Codable Questions: 1) The story contains (pop) cultural references to books and TV shows, etc.; what are they?

Documentation:

  • Conditions:

  • 17 bred rolls in a wreath, one of these bread rolls contain the plastic king

  • the croissant monster knows where the plastic king is hidden, whereas you don’t know

  • You have to guess in which bread roll the plastic king is hidden

  • First round: When you pick a bread roll, the croissant monster takes away another another bread roll without the king in it.

  • Next round: We do the same: You pick another bread roll (not the same as before), and the croissant monster once again takes away another bread roll without the king in it.

  • Next round: And the rounds continue like this.

Question: How many rounds do have to pass for you to have at least a 50 % chance to have the king in your picked bread roll, with the condition that you keep switching between the remaining bread rolls?

 

Categorystory
Coding Levelnull
Coding Ideasnull
Coding LanguagesCode Solutions on GitHub β†—
Story Genrenull
Story Content Key Wordsnull
Story LicenseCC BY-NC-SA 4.0 International
Parental Rating6+ For Everyone
How To Quote Story(null, adapted by StoryCoder.dev under CC BY-NC-SA 4.0 International)
Picture Licensenull
How to Quote Picture(adapted by StoryCoder.dev under null)
Available SolutionsRuby
TitleCroissant Monster and the Plastic King
Authornull
Tags
Shopping Basket