Answered step by step
Verified Expert Solution
Question
1 Approved Answer
read _ dice ( ) input five integers on one line separated by blank spaces. Convert to integersand return a list. To correct potential input
readdice input five integers on one line separated by blank spaces. Convert to integersand return a list. To correct potential input errors, values above are recorded as and valuesbelow are recorded as For example:
scoredicerounds prompt the player to enter a series of dice values indicated byparameter rounds. Within a for loop, call readdicethat returns a list. Check whichscoring category is achieved if any and add the appropriate score to a running total. Checkscoring categories from highest to lowest by calling each function such asfourofkind Only the first matching category is used and all other categories areskipped. Print the updated score at the end of each iteration. Warning, this is a long method!Sample of three rounds that includes two pair, fiveofkind and a large straight.
Score:
Score:
Score:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started