Question: PYTHON 1 from goody import irange, type asstr 2 36 class Date: 4 month-dict {1:31, 2:28, 3:31, 4:30, 5:31, 6:30, 7:31, 8:31, 9:30, 10:31, 11:30,
PYTHON


1 from goody import irange, type asstr 2 36 class Date: 4 month-dict {1:31, 2:28, 3:31, 4:30, 5:31, 6:30, 7:31, 8:31, 9:30, 10:31, 11:30, 12:31) @staticmethod 6 7e def is_leap_ year(year): 8 9 10 11 def days_in(year,month): 12 13 14 15 16 17 18 if name ==' main ': 19 20 return (year%4-0 and year%100 != 0) or year%400 == 0 @staticmethod return Date.month dict month(1 if month2 and Date.is leap year(year) else 0) # Put in simple tests for Date before allowing driver to run print() import driver 23 24 driver.default file name = 'bsc1.txt' 26 # 27 # 28 driver . default show traceback = True driver.default.-show exception = True driver . default-show exception-message = True driver.driver()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
