Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168733
Image: ubuntu2004
HighestNumber = 15 HN1 = HighestNumber + 1 Total = log(HN1,2) if Total == int(Total): TotalCards = Total while (TotalCards > 0): print "Card", TotalCards, print[x for x in range(HN1) if x & 2^(TotalCards-1)] TotalCards = TotalCards - 1
Card 4 [8, 9, 10, 11, 12, 13, 14, 15] Card 3 [4, 5, 6, 7, 12, 13, 14, 15] Card 2 [2, 3, 6, 7, 10, 11, 14, 15] Card 1 [1, 3, 5, 7, 9, 11, 13, 15]