def phazed_score(hand): # Implement this function. value_dict = {'A': 25, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, '0': 10, 'J': 11, 'Q': 12, 'K': 13} value_list = [_[0] for _ in hand] int_value_list = [value_dict[i] for i in value_list] return sum(int_value_list)if __name__ == '__main__': # Example calls to the function. print(phazed_score(['9D', '9S', '9D', '0D', '0S', '0D'])) print(phazed_score(['2D', '9S', 'AD', '0D'])) print(phazed_score([]))
game-spec_1_4_translate.pdf
game-spec.pdf