[Solved] King Dice Roller

$25

File Name: King_Dice_Roller.zip
File Size: 150.72 KB

SKU: [Solved] King Dice Roller Category: Tag:
5/5 - (1 vote)

Objective: To implement a program that creates a simple guessing game based on the rolling of two dice. This assignment will be building on a wide scope of programming topics that have already been covered, such as I/O, formatted output, loops, conditional statements, assignment operators, logic operators, and the use of the import statement to import a module into your program that will be used to give it added functionality.

Description: In many variations of guessing games, the main goal is to (as the name suggests), guess the correct value of something. In this assignment, you will have to implement a program that rolls two 6-sided die and finds the sum of their values; the player gets only THREE chances to guess correctly. Every time a guess is entered, print to the screen whether that entered value is too high from the generated value or too low from it, along with displaying the number of attempts the player has left. This will be to help the player in narrowing down the correct guess as opposed to blind guesswork. To implement these three guessing opportunities, the use of a looping statement will help to minimize the amount of code required. Recall how break and continue statements work, as these will also help in minimizing the amount of code to write up. If all attempts to guess have been exhausted, print out the value of the sum of both rolled dice. An additional requirement for this project will be to ensure to safeguard the player from out-of-bound guesses. For example, there is no such thing as a negative sum if both summed numbers are positive, likewise with a sum of 0 as the minimum face value of both die will be 1. On these out-of-bounds guesses, make sure NOT to take off any attempts. In other words, if the player has two attempts left but enters an out-of-bounds guess, they must still have two attempts left.

Note: Save your file as firstname_lastname_dice.py.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] King Dice Roller
$25