Lucky Sevens

Screenshot of Lucky Sevens

  • Key Details: Dice Game

  • Description: “Lucky Sevens” is an illustrative dice game used to illustrate how quickly a gambler’s luck can go awry.

  • Extended Explanation: In the game of Lucky Sevens, the player rolls a pair of dice. If the dots add up to 7, the player wins $4; otherwise, the player loses $1. Suppose that, to entice the gullible, a casino tells players that there are lots of ways to win: (1 & 6), (2 & 5), etc. A little mathematical analysis reveals that there are not enough ways to win to make the game worth-while. Yet because many people’s eyes glaze over at the first mention of mathematics, this program was produced to demonstrate the futility of playing the game.

    Players are asked for an amount of money that the player wants to put into the pot, and play the game until the pot is empty. At that point, the program prints the number of rolls it took to break the player, as well as the maximum amount of money that was in the pot at its high point.

  • Programming Process and Methods: Created from scratch in Python using Python 2.7.3 in the stock Python Shell for GAM215O (“Game Scripting”) Project 2 in September 2012.

Share Button

Leave a Reply

Your email address will not be published. Required fields are marked *