Question: What to do Create a new file called yahtzee2,py. Implement and following user-defined functions and update the main() function accordingly: - num_of_a_kind() (this function will

What to do Create a new file called yahtzee2,py. Implement and following user-defined functions and update the main() function accordingly: - num_of_a_kind() (this function will generalize both the "3 of a kind" and "4 of a kind ) Use the following template. All functions defined in the template must be present and implemented in your code (you may not omit functions). You may add extra functions if needed. * Version 1 functions here, excluding main() def num_of_a_kind(ro11: tuple, number: int) int: If a roll has EXACTLY "number dice of the same face value, returns the sum of all five values in the roll. otherwise, returns . pass def yahtzee(roll: tuple) int: Returns 50 if the roll is a Yahtzee (all dice in the ro11 have the same face value). Otherwise, returns . pass def main(): Main function. \# Version 1 code " TODO: Calculate and display "3 of a kind" for the given roll a TODO: Calculate and display "4 of a kind" for the given roll * TOoO: Calculate and display "Yahtzee" for the given roll if mainmamenat)= "-main_": Hints - Just like in version 1, do not overthink your code! Each function is only a few lines of code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
