Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#MonthOfCode day 31 - exit
# a dumb game. How to win this?
import random
import time
import sys
t0 = time.time()
while True:
if random.choice((True,False)):
if random.choice( (True,False,False,False,False,False,False,False,False) ):
print "Program exited! Your score:","%.2f" % (time.time() - t0),"sec. Can you do better?"
sys.exit( 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment