Sunday Times Teaser 3086 – Four-Sided Dice Game
by Howard Williams
Published Sunday November 14 2021 (link)
I have two identical four-sided dice (regular tetrahedra). Each die has the numbers 1 to 4 on the faces. Nia and Rhys play a game in which each of them takes turns throwing the two dice, scoring the sum of the two hidden numbers. After each has thrown both dice three times, if only one of them scores an agreed total or over, then he or she is the winner. Otherwise the game is drawn.
After Nia has thrown once, and Rhys twice, they both have a chance of winning. If Rhys had scored less on his first throws and Nia had scored double her first throw total, then Nia would have had a 35 times greater chance of winning.
What are Nia’s and Rhys’ scores and the agreed winning total?
What a brilliant solution, Brian!
As an exercise I rewrote your code using lists instead of dictionaries. Dictionaries are definitely more intuitive in this case.
Once again a chunk of code has dissappeared from my post. I’ll send it by email.
Hi John,
Good to see you posting again! I have added your emailed version.
I’m sorry that you are having issues. It is a site issue and not a problem at your end.
I also looked at using lists in place of dictionaries but decided to stay with the latter.
Brian