Jun-13-2019, 09:41 AM
Hello I've just started using python and i would love some help with this program code, i don't really know how to make it and it would be great if someone could help, thanks.
Problem 1 — Days of the year The program will ask the user for a day, month and year and calculate how many days in the year have passed. For example, if the user enters 3rd February 2007, then that is the 34th day of the year. (31 days in January, plus 3 in February). The program should store the number of days in each month in an appropriate data structure. The number of days are as follows:
January 31 days
February 28 days
March 31 days
April 30 days
May 31 days
June 30 days
July 31 days
August 31 days
September 30 days
October 31 days
November 30 days
December 31 days
Note that leap years occur every four years, and during a leap year the month of February has 29 days instead of 28. The program should determine whether the year is a leap year or not. In the case of a leap year, an additional day must be added to the calculation if the input month is later than February. The program should make use of subroutines, and follow standard naming conventions.
Problem 1 — Days of the year The program will ask the user for a day, month and year and calculate how many days in the year have passed. For example, if the user enters 3rd February 2007, then that is the 34th day of the year. (31 days in January, plus 3 in February). The program should store the number of days in each month in an appropriate data structure. The number of days are as follows:
January 31 days
February 28 days
March 31 days
April 30 days
May 31 days
June 30 days
July 31 days
August 31 days
September 30 days
October 31 days
November 30 days
December 31 days
Note that leap years occur every four years, and during a leap year the month of February has 29 days instead of 28. The program should determine whether the year is a leap year or not. In the case of a leap year, an additional day must be added to the calculation if the input month is later than February. The program should make use of subroutines, and follow standard naming conventions.