Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Write a program rolling_dice.py that is a game of pure luck. You will be using a tuple throw to keep the results of the two

image text in transcribed

Write a program rolling_dice.py that is a game of pure luck. You will be using a tuple throw to keep the results of the two dice in every throw Rules: Roll two 6-sided dice. If the result of the sum of the two dice is: 7 or 11 on first throw, player wins 2,3, or 12 on first throw, player loses 4,5,6, 8,9, 10-value becomes player's "point". o Player must roll for his "point" (to win) before rolling 7 o Player keeps rolling the dice until either rolling a 7 (player loses) or re-rolling the value of the initial roll (player wins) Outline of your program: As it will be described in more detail in the sections below, your program should do the following: (1) Initialize the Game by printing the rules of the game. (2) Roll the two dice (3) Check the sum of the values from the 2 dice against the rules (using the built-in sum function). 4) Check if there is a win/lose or you need to roll again. 5) Extra Challenge: Compute statistics for the game (see below "Implementation Details") Implementation Details & Hints: .Use a tuple (throw) to keep the result of the two dice for every throw Use the built-in sum) function to sum the values of the tuple (throw)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students explore these related Databases questions