Name_________________ net-id _______ Name_________________ net-id _______ Name_________________ net-id _______ Name_________________ net-id _______
These questions are based on the code for rolling dice and simulating poker hands in Cartester.py
counts = [0]*13
in
get_rank_counts
of the Cardtester.py module?
get_deck
what is the last
card stored in the deck that is returned?
get_hand
the best?
if
statement in
is_pair
? (more than one may be possible)
return ranks.count(2) == 1 and ranks.count(1) == 3
return ranks.count(1) == 3 and ranks.count(2) == 1
return ranks.count(2) == 1
is_fullhouse(hand)
that
returns True if and only if a hand is a full house? (three of one rank,
two of anothere, e.g., three jacks and two fives.