Question: Part I: Drop Dead Dice (4 points) Drop Dead is a game played with dice. Players take turns rolling up to five dice and earn

Part I: Drop Dead Dice (4 points) Drop Dead is a game played with dice. Players take turns rolling up to five dice and earn points based on the numbers that they roll. If a player rolls a 2 or 5 on any of the dice, those dice are declared "dead" and may not be re-rolled that turn; in addition, the player scores 0 for that roll. Otherwise, if no 2s or 5s are rolled, the player earns points equal to the sum of the values shown on all of the dice. For example, a roll of 6, 1, 3,6, 3 is worth 19 points; a roll of 4, 1, 6, 3, 2 earns 0 points (due to the 2). Complete the score () function, which takes a list of five integer values (representing the values rolled on five ordinary six-sided dice) as its sole argument. If the list contains any 2s or 5s, the function returns 0. Otherwise, the function returns the score for that "hand" of dice Examples: Return Value Function Call score ([ 6, 3, 3, 1, 5 1)0 score ([ 6, 1, 3, 1, 41)15 score ([ 4, 1, 2, 4, 41) 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
