subject

This is the question write another function that, given the day that the month starts on and the number of days in that given month, returns the number of days that Inky, Blinky, Pinky and Clyde will get to play pinball in that month. Your function should return a tuple of integers with the respective signature ordering (Inky, Blinky, Pinky, Clyde).

The function provided will increment the day of the week to the next correct day. Use it wisely! def incDay(day) : if (day == "Sunday") : return "Monday" elif (day == "Monday") : return "Tuesday" elif (day == "Tuesday") : return "Wednesday" elif (day == "Wednesday") : return "Thursday" elif (day == "Thursday") : return "Friday" elif (day == "Friday") : return "Saturday" elif (day == "Saturday") : return "Sunday"

This is what I have done so far:

def pinball(day_week, day_month):
if day_month % 4 == 0:
return "Pinky"
else:
if day_week[0] == "T":
return "Inky"
elif day_week[0] == "S":
return "Blinky"
else:
return "Clyde"

def incDay(day) :
if (day == "Sunday") :
return "Monday"
elif (day == "Monday") :
return "Tuesday"
elif (day == "Tuesday") :
return "Wednesday"
elif (day == "Wednesday") :
return "Thursday"
elif (day == "Thursday") :
return "Friday"
elif (day == "Friday") :
return "Saturday"
elif (day == "Saturday") :
return "Sunday"

#Here I don't know what to do#

#these are the test cases#
print("#1", pinball("Sunday",31) == (7,8,7,9))
print("#2", pinball("Wednesday",30) == (7,6,7,10))
print("#3", pinball("Wednesday",0) == (0,0,0,0))

Thats all
Plz help

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 17:00, Need1ng
The more powerful, 60 volt cables and the main power shut-off on an hev are both colored orange.
Answers: 1
image
Computers and Technology, 23.06.2019 20:00, emmaraeschool
Me ajude por favor , coloquei uma senha e não consigo tira-la no chorme
Answers: 2
image
Computers and Technology, 24.06.2019 02:00, ishmael9332
How are we able to create photographs differently than 100 years ago? explain your answer in relation to your photograph you selected.
Answers: 1
image
Computers and Technology, 24.06.2019 13:30, iicekingmann
In the rgb model, which color is formed by combining the constituent colors? a) black b) brown c) yellow d) white e) blue
Answers: 1
You know the right answer?
This is the question write another function that, given the day that the month starts on and the nu...

Questions in other subjects: