Created
September 29, 2014 01:30
-
-
Save eyeseast/b6603913c2bd3a8a1912 to your computer and use it in GitHub Desktop.
Showing a kid how programming works
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 | |
import os | |
import time | |
def countdown(message='Happy New Year!'): | |
for count in range(10, 0, -1): | |
print count | |
os.system('say %s' % count) | |
time.sleep(.3) | |
os.system('say %s' % message) | |
if __name__ == "__main__": | |
countdown(' '.join(sys.argv[1:])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment