All pastes #811276 Raw Edit

Doog

public python v1 · immutable
·published 2007-12-10 19:38 UTC
rendered paste body
months = ["january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"]def addDays(mos, days):  i = 0    if mos > 1:    totalDays = days - 2  else:    totalDays = days    for i in range(mos):    if i/2 == i/2.0:      totalDays = totalDays + 31    elif i/2 != i/2.0:      totalDays = totalDays + 30    return totalDaysmyMonth = raw_input("What month were you born in?")myDay = raw_input("And, what day were you born on?")i = 0for i in range(12):  if myMonth.lower() == months[i]:    print "You were born in " + months[i] + "!"    breaktotalDays = addDays(i, int(myDay))print "You were born " + str(totalDays) + " days into the year."