Bengt Richter wrote: > On Thu, 22 Dec 2005 09:29:49 -0500, rbt <[EMAIL PROTECTED]> wrote: > >> The house almost always wins or are my assumptions wrong... >> >> import random >> >> amounts = [.01, 1, 5, 10, 25, 50, 75, 100, 200, 300, 400, 500, 750, >> 1000, 5000, 10000, 25000, 50000, 75000, 100000, 200000, >> 300000, 400000, 500000, 750000, 1000000] >> >> results = [] >> >> count = 0 >> while count < 10: >> count = count + 1 >> pick = random.choice(amounts) >> if pick < 100000: >> results.append("NBC won... Your briefcase contains $%s" %pick) >> else: >> results.append("You won... Your briefcase contains $%s" %pick) >> >> results.sort() >> print "Here are 10 random picks: " >> for result in results: >> print result > > I don't know what you are doing, but 10 is a small sample to draw confident > conclusions from. E.g., try counting how many times pick<100000 out of > a larger number, e.g.,
The TV show on NBC in the USA running this week during primetime (Deal or No Deal). I figure there are roughly 10, maybe 15 contestants. They pick a briefcase that has between 1 penny and 1 million bucks and then play this silly game where NBC tries to buy the briefcase from them while amounts of money are taken away from the list of possibilities. The contestant's hope is that they've picked a briefcase with a lot of money and that when an amount is removed from the list that it is small amount of money not a large amount (I categorize a large amount to be more than 100,000) NBC tries to give the least amount of money possible away. The contestants try to get the most. > What should the sum be? 100,000 or above unless you're already rich ;) -- http://mail.python.org/mailman/listinfo/python-list