First write the program date.py, which should take in a month, day of the month and year, and convert it to the corresponding day of the year. Assume that leap years exist. Check that each date is correct (ie. March 56, 2017 is incorrect). For incorrect dates the conversion function should return -1, and you should print an error from main. For both programs, use dictionaries to store whatever data you might need (the number of days in each month, etc.)

Solved
Show answers

Ask an AI advisor a question