Question: read _ dice ( ) input five integers on one line separated by blank spaces. Convert to integers and return a list. To correct potential

read_dice() input five integers on one line separated by blank spaces. Convert to integers and return a list. To correct potential input errors, values above 6 are recorded as 6 and values below 1 are recorded as 1.
score_dice(rounds) prompt the player to enter a series of dice values indicated by parameter rounds. Within a for loop, call read_dice()that returns a list. Check which scoring category is achieved (if any) and add the appropriate score to a running total. Check scoring categories from highest to lowest by calling each function such as four_of_kind(). Only the first matching category is used and all other categories are skipped. Print the updated score at the end of each iteration. Warning, this is a long method! Sample of three rounds that includes two pair, five-of-kind and a large straight.
 read_dice() input five integers on one line separated by blank spaces.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!