subject

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

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:00
If a client wants to make minor edits, what should he/she use?
Answers: 3
question
Computers and Technology, 22.06.2019 16:30
Primary tech skills are skills that are necessary for success in online education
Answers: 3
question
Computers and Technology, 22.06.2019 21:30
Elements such as fonts colors visual structure graphics and the interface of a web page should complement each other to ensure blank
Answers: 3
question
Computers and Technology, 23.06.2019 12:50
Which syntax error in programming is unlikely to be highlighted by a compiler or an interpreter? a variable name misspelling a missing space a comma in place of a period a missing closing quotation mark
Answers: 1
You know the right answer?
Class Date: '''class to represent a date'''

def __init__(self, month, day, year):
...
Questions
question
Social Studies, 16.04.2021 03:30
question
Mathematics, 16.04.2021 03:30
question
Mathematics, 16.04.2021 03:30
question
Mathematics, 16.04.2021 03:30
question
Mathematics, 16.04.2021 03:30
Questions on the website: 13722363