On 11/20/2016 01:33 AM, Dominique Laurain wrote:


    How do I get a solution similar to the one for flushes?


I guess you don't hope for the exact same solution, for exercice "hand
of four" than for "flush" :-)

If your question "How do I get" means "How I can code " and is related
to the probability to get hand of four (end of exercice),.., why not :

Hands = Subsets(Cards, 5)
print len(FourOfKinds) / Hands.cardinality()

 len(FourOfKinds)  is 624 because 13 choices for the "kind", 12 choice
for the kind of the "odd card" when kind choosen, 4 suits for that card.
624 = 13 x 12 x 4

I managed to get that far. I am looking for a solution that uses a set for FourOfKinds and then

print FourOfKinds.cardinality() / Hands.cardinality()

Tom Dean

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to