Whats up guys?
I need help my code is not working too great could someone please help me?
My Input should be : 03/12 hello there
My Output should be : March the 12th: hello there
It needs to work for January, February, March, April, May and June. And all dates the input date can be either "03/12" or " 03:12" and i should get the same output.
Here is my code:
def Program(month):
if month == "01" :
return "January"
elif month == "02" :
return "February"
elif month == "03" :
return "March"
elif month == "04" :
return "April"
elif month == "05" :
return "May"
elif month == "06" :
return "June"
month = raw_input()
Program(month)
def Program2(date):
if date == "01" :
return "1st"
elif date == "02" :
return "2nd"
elif date == "03" :
return "3rd"
elif date == "04" :
return "4th"
elif date == "05" :
return "5th"
elif date == "06" :
return "6th"
elif date == "07" :
return "7th"
elif date == "08" :
return "8th"
elif date == "09" :
return "9th"
elif date == "10" :
return "10th"
elif date == "11" :
return "11th"
elif date == "12" :
return "12th"
elif date == "13" :
return "13th"
elif date == "14" :
return "14th"
elif date == "15" :
return "15th"
elif date == "16" :
return "16th"
elif date == "17" :
return "17th"
elif date == "18" :
return "18th"
elif date == "19" :
return "19th"
elif date == "20" :
return "20th"
elif date == "21" :
return "21st"
elif date == "22" :
return "22nd"
elif date == "23" :
return "23rd"
elif date == "24" :
return "24th"
elif date == "25" :
return "25th"
elif date == "26" :
return "26th"
elif date == "27" :
return "27th"
elif date == "28" :
return "28th"
elif date == "29" :
return "29th"
elif date == "30" :
return "30th"
elif date == "31" :
return "31st"
date = raw_input()
Program2(date)
def Sign(Symbol) :
if Symbol == ":" :
return " the "
Symbol = raw_input()
Sign(Symbol)
Activity = raw_input()
print Program(month) + " the " + Program2(date) + ":" + Activity
Your help would be much appreciated :)