Complete the two functions below:
calculate_score
takes a list of dice rollscores
and returns the total score only taking into account scores of>= MIN_SCORE
. If scores contains invalid data (!= DICE_VALUES
) raise aValueError
.get_winner
uses thiscalculate_score
helper to calculate the winning player from a list ofPlayer namedtuples
. However if the players passed in are not having the same number of scores (e.g. all have 4 scores) you should raise aValueError
too.See the
docstring
s andpytest
code for more info. Keep calm and code in Python, happy Cyber Monday!
11 out of 11 users completed this Bite.
Will you be Pythonista #12 to crack this Bite?
Average Bite difficulty 1-10 rating: 1.0
» You can do it! 😌