Created
July 23, 2012 00:21
-
-
Save geeksunny/3161452 to your computer and use it in GitHub Desktop.
A Python script to determine an arbitrary date to name as the birthday of our adopted stray cat, n00blet.
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/python | |
name = 'n00blet' | |
# adopted: march 11, 2011 (the 3rd month of the year) | |
# born: ~june 2010? (Was approximately 9 months old at time of adoption.) | |
def strToInt(string): | |
total = 0 | |
for letter in string: | |
total += ord(letter) | |
return total | |
print name + "'s birthday is June " + str(strToInt(name) / 9 / 3) + ", 2010!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment