Created
March 2, 2011 23:06
-
-
Save cswingler/851965 to your computer and use it in GitHub Desktop.
Chins
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
#!/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