Day name-2
dayNames = ['Sunday','Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
d= input('Enter the weekday of the first day of the month: ')
N = int(input('Enter an integer: '))
i = N%7-1
if d in dayNames:
j = dayNames.index(d)+i
if j >= 7:
j = j - 7
print(dayNames[j])
Comments
Leave a comment