Skip to content

Instantly share code, notes, and snippets.

@geeksunny
Created July 23, 2012 00:21
Show Gist options
  • Save geeksunny/3161452 to your computer and use it in GitHub Desktop.
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.
#!/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