This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s='' | |
while'BYE'!=s:s=raw_input();print["HUH?! SPEAK UP, SONNY!","NO, NOT SINCE %d!"%(1930+id(s)%21)][s.isupper()] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
whichTest = True #True -> python's random | |
#False -> coin flip random | |
outputFileName = 'porOutput.txt' if whichTest else 'testOutput.txt' | |
with open(outputFileName,'w') as f: | |
x = 0.0 | |
inc = 0.01 | |
f.write('desired probability, true count, false count, actual probability\n') |