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

Other questions on the subject: Computers and Technology

image
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
image
Computers and Technology, 22.06.2019 11:00, Lacey9319
The editing of digital photos us about the same level of difficulty as editing an analog photo
Answers: 2
image
Computers and Technology, 23.06.2019 04:40, Koriunaa
The narrative structure of the popular movies can be broken down into
Answers: 3
image
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
You know the right answer?
Class Date: '''class to represent a date'''

def __init__(self, month, day, year):
...

Questions in other subjects: