Skip to content

Instantly share code, notes, and snippets.

@cswingler
Created March 2, 2011 23:06
Show Gist options
  • Save cswingler/851965 to your computer and use it in GitHub Desktop.
Save cswingler/851965 to your computer and use it in GitHub Desktop.
Chins
#!/usr/bin/env python
import sys
try:
chins = long(sys.argv[1])
except IndexError:
raise IndexError, 'needachin'
except ValueError:
raise ValueError, 'needintchins'
if chins < 0:
raise ValueError, 'negachin'
print " __________"
print "(--[ .]-[ .]"
if chins == 0:
print "(_______O__)"
sys.exit(0)
else:
print "( O )"
for i in range(1, chins):
print "( )"
print "(__________)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment