ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 10 Weeks Ago, 4 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 22 May 2017 My Price 9.00

Write Python Code for a dice game

Write Python Code for a dice game. 2 players and a die are required.

 

Rules:

     1) Roll the Dice.

     2) If user rolled a 1:

             The pot gets set to zero

             The other player goes to step 1.

     3) Else roll of 2-6 is added to the pot.

     4) User can choose to hold or roll again.

              Choice ROLL= Return to Step 1.

              Choice HOLD=

                    -Increment Player score by the pot amount.

                    -Pot gets set to 0.

                    -second player gets to roll and goes to Step 1.

 

 

ADDITIONAL INFO!

- Before each opponent begins rolling:         Output the score for the person and the computer.

- Output the opponents whose turn is beginning and ask the user to hit enter to    continue.

- With each dice roll.     Output the die value, and amount of the round pot. - If it�s the users roll ask if they want to roll again ( R ) or Hold ( H ). Your program    should allow r, R, h or H as valid input. If input is anything else, ask the user    again until valid input is obtained.

- The AI will continue playing until the round pot is 20 or more. - Once a players pot is greater or equal to 50 then they have won, it will no longer ask if    they want to keep rolling the die or not.

- Once there is a winner        Score totals are output along with who the winner was. User or Computer

- Player is asked if they want to play again Y or N. Valid input should be y, Y, yes,     YES, or n, N, no, NO.

 

-When a new game starts the starting roll goes to the player that did not roll last. If the

User rolled last in the previous game, then the computer rolls first and vice versa. When

the program first begins, the player will make the first roll of the first game

Answers

(11)
Status NEW Posted 22 May 2017 12:05 AM My Price 9.00

-----------

Not Rated(0)