Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Poker Dice GameProgram Specifications Write a program to calculate the score from a throw of five dice. Scores are assigned to different categories for singles
Poker Dice GameProgram Specifications Write a program to calculate the score from a throw of five dice. Scores are assigned to different categories for singles three of a kind, four of a kind, five of a kind, full house, and straight. Follow each step to gradually complete all functions.Note: This program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress.Step Review the poker game step document. Five integer values are input and inserted into a list. The list is sorted and passed to findhighscore to determine the highest scoring category. Make no changes to the main code. Stubs are provided for all remaining functions.Step Write the checksingles function. Return the sum of all values that match parameter goal. Update the findhighscore function to use a loop to call checksingles six times with parameters being Return the highest score from all function calls. Test it and move to next step.Ex: If input is:the output is:High score: Step Write the checkthreeofkind checkfourofkind and checkfiveofkind functions. Hint: Since the values are in ascending order, the same values are stored in consecutive index locations. Return from checkthreeofkind if the dice contain at least three of the same values. Ex: Return from checkfourofkind if the dice contain at least four of the same values. Ex: Return from checkfiveofkind if the dice contain five identical values. Ex: Update the findhighscore function to call the three functions and return the highest score from all function calls. Test it and move to the next step.Ex: If input is:the output is:High score: Step Write the checkfullhouse function to return if the dice contain a full house a pair and three of a kind Ex: Note: Five of a kind also satisfies the definition of a full house since includes a pair of s and three s Update the findhighscore function to call checkfullhouse and return the highest score from all function calls. Test and move to next.Step Write the checkstraight function to return if the dice contain a straight of or Update the findhighscore function to call checkstraight and return the highest score from all function calls. Submit for grading to confirm all tests pass. PYTHON
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