import randomSo here it, a python answer to Mondays problem. So far so good, aimed fro three posts this week, got three posts up this week. It's really the answer in the book, converted to a python answer. Have a good weekend, and stay safe.
M = 24
totalCorrect = 0
for k in range(1, 100000):
correct = 0
term = random.randrange(1, M)
for j in range(1, M):
if term = j:
correct += 1
totalCorrect = totalCorrect + correct
print(totalCorrect/1000000)
“Aristotle maintained that women have fewer teeth than men; although he was twice married, it never occurred to him to verify this statement by examining his wives' mouths.” - Bertrand Russell on Aristotle's Mistake
Friday, October 10, 2014
Answer to Monday.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment