Problem 1.
September 12, 2022
Solution
In straight poker, five cards are dealt to each player from a deck of ordinary playing cards.
1. What is the probability that the a player will be dealt a flush?
[1]: from numpy import arange
from itertools import combinations
deck = arange(0, 52)
suit = arange(0,13)
hands = len(list(combinations(deck, 5)))
flush = len(list(combinations(suit, 5)))
flush = (4*flush)/hands
print("The probability of being dealt flush is: %.6f (%.3f%%)" % (flush,␣
,→flush*100))
The probability of being dealt flush is: 0.001981 (0.198%)