Question: This is in python please help # Part a) ---------------------------------------------------- # variable name : day1 # define an integer between 1 and 365 # add
This is in python please help
# Part a) ---------------------------------------------------- # variable name : day1 # define an integer between 1 and 365
# add code here
# Part b) ---------------------------------------------------- # variable name : month_list1 # define a list of length 12, where each item is the number of # days in the month for a common year: jan,feb,mar,...
# add code here
# Part c) ---------------------------------------------------- # variable name : month_day1 # Goal: day1 specifies a day in a common year. Find the month # and day of the month corresponding to day1. Store the # month as a string and the day as an integer in a # list of length 2 # - use a conditional statement # - hint : there should be at least 10 elif statements in your # conditional statement # - hint : use the sum() function on a slice of month_list1 # as conditions in your conditional
# add code here
#------------------------------------------------------------- #-------------------------------------------------------------
# Part d) ---------------------------------------------------- # variable name : month_day2 # define a list of length 2. The first item is a month as a # string. The second item is an integer between 1 and the # number of days in that month.
# add code here
# Part e) ---------------------------------------------------- # variable name : day2 # use a conditional statement to find the day of the year # corresponding to month_day2 # - hint : there should be at least 10 elif statements in your # conditional statement # - hint : use the sum() function on a slice of month_list1 # as part of your computation
# add code here
#------------------------------------------------------------- #-------------------------------------------------------------
# Part f) ---------------------------------------------------- # variable name : sec3 # define an integer between 0 and 31535999 # - for this problem sec3 is the time in seconds after midnight # at the start of a new common year
# Part g) ---------------------------------------------------- # variable name : day3 # find the number of days that have passed (0-364) # after sec3 seconds # hint : use // for integer division # hint : you may want to save the remainder as well for later parts
# Part h) ---------------------------------------------------- # variable name : hour3 # regarding sec3, find the number of hours that have passed (0-23) # after day3 days have passed
# Part i) ---------------------------------------------------- # variable name : minute3 # regarding sec3, find the number of minutes that have passed (0-59) # after day3 days have passed and hour3 hours have passed
# Part j) ---------------------------------------------------- # variable name : second3 # regarding sec3, find the number of seconds that have passed (0-59) # after day3 days have passed and hour3 hours have passed and # minute3 minutes have passed
# Part l) ---------------------------------------------------- # variable name : date_time # combine the results from parts g)-j) in a list # [days,hours,minutes,seconds]
# add code here
# Part m) (bonus) -------------------------------------------- # variable name : date_time_bonus # find the month (string) corresponding to date_time using a # conditional and define a new list # [month,day of the month,hour,minute, second] # hint : if day3 is 0, the day of the month is 1 # note : use a 24 hour day: 1pm would be 13 hours
# add code here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
