Skip to content

Instantly share code, notes, and snippets.

View burstburst's full-sized avatar

Mark Burst burstburst

View GitHub Profile

Keybase proof

I hereby claim:

  • I am mburstiner on github.
  • I am burst (https://keybase.io/burst) on keybase.
  • I have a public key ASA7ilzL2swhsetCapva-07YMDW1iosiBE27-ImdiT_4Xgo

To claim this, I am signing this object:

@burstburst
burstburst / gist:5471734
Created April 27, 2013 03:05
LPTHW Ex35 EC5
def gold_room():
print "This room is full of gold. How much do you take?"
next = raw_input("> ")
try:
how_much = int(next)
except ValueError:
dead("That's not a number!!")
@burstburst
burstburst / gist:5295253
Created April 2, 2013 19:11
Riddle script
import sys
answer1 = raw_input("Here's your first riddle.\nMost gaming tools and services on Android are:\n _ _ _ _ - _ _ _ _ _ _ _ _ _ _\n>>")
while True:
answer1.lower() != 'half-baked ideas'
if answer1.lower() == 'half-baked ideas':
print 'You got it! Congrats! Go and see Stephen Lau on the Google [x] team. He\'s an engineer on Project Glass and he worked on the prototype of FTW back in the day. He\'ll have your next riddle for you.'
break
else:
@burstburst
burstburst / gist:5112957
Created March 7, 2013 23:45
Adding variables help
def video_games(xbox_games, wii_games, total_games):
print "You have %d Xbox games." % xbox_games
print "You have %d Wii games." % wii_games
print "Looks like you have about %d games total." % total_games
print "Ok, how many Xbox games do you have?"
xbox_count = raw_input("> ")
print "How about Wii games?"
wii_count = raw_input("> ")
@burstburst
burstburst / LPTHW Ex 13
Last active December 14, 2015 03:28
I'm not sure what I'm doing wrong here. I'm on Ex 13 of LPTHW and I'm trying to figure out how to do the extra credit: Combine raw_input with argv to make a script that gets more input from a user. I keep getting too many/few values to unpack and when it does process successfully, it doesn't use the answers to the raw input. Any pointers would b…
from sys import argv
script, first, second, third = argv
two = raw_input("What's your name?")
three = raw_input("Hair color?")
four = raw_input("What color are your eyes?")
five = raw_input("What's this?")
print "The script is called: %r" % script