def ptyear(mm,dd): year = {"1": "31", "2": "28", "3": "31", "4": "30", "5": "31", "6": "30", "7": "31", "8": "31", "9": "30","10": "31", "11": "30", "12": "31"} for i in range(1, int(mm)): dd = dd + int(year[str(i)]) print(dd) def ryear(mm,dd): year = {"1": "31", "2": "29", ...