Class Date:
'''class to represent a date'''
def __init__(self, month, day, year):
...
Computers and Technology, 18.03.2021 01:50 Anderson0300
Class Date:
'''class to represent a date'''
def __init__(self, month, day, year):
'''Date(month, day, year) -> Date'''
self. month = month
self. day = day
self. year = year
def __str__(self):
'''str(Date) -> str
returns date in readable format'''
# list of strings for the months
months = ['','Jan','Feb','Mar','Apr','May',' Jun','Jul',
'Aug','Sep','Oct','Nov','Dec']
output = months[self. month] + ' ' # month
output += str(self. day) + ', ' # day
output += str(self. year)
return output
def go_to_next_day(self):
'''Date. go_to_next_day()
advances the date to the next day'''
# list with the days in the month
daysInMonth = [0,31,28,31,30,31,30,31,31,30,31,30 ,31]
# check for leap year
isLeapYear = self. year%4 == 0 and \
(self. year%100 != 0 or self. year%400 == 0)
I kinda stuck on what to write next anybody know how I can finish my go_to_next day function
Answers: 3
Computers and Technology, 22.06.2019 02:00, itsyagirl11076
What is the process in which the software development team compiles information to determine the final product.
Answers: 3
Computers and Technology, 23.06.2019 06:30, jayjay5246
Which option correctly describes a dbms application? a. software used to manage databases b. software used to organize files and folders c. software used to develop specialized images d. software used to create effective presentations
Answers: 1
History, 11.07.2019 04:30
Social Studies, 11.07.2019 04:30
Biology, 11.07.2019 04:30
Mathematics, 11.07.2019 04:30
Mathematics, 11.07.2019 04:30