So I'm trying to write code to change an entered integer number into a month. The goal is to take an entered argument and convert it to a date. Code below.
def date(month, day, year):
mon = ("January", "February", "March", "April", "May", "June", "July",
"August", "September", "October", "November", "December")
for i in range(len(mon)):
print(mon[i]+" "+str(day)+", "+str(year))
With this code I can get it to print all the dates from January to December in the correct format but I don't know what to change
for i in range(len(mon)):
to in order to select only the month entered in the argument.
EX: When entered into the console as date(6,17,2016)
it should print June 17, 2016
.