5. Write a program that asks the user the day number in a year in the range 2 to 365 and asks the first day of the year – Sunday or Monday or Tuesday etp. Then the program should display the day on the day-number that has been input.

# Code
x = int(input(‘Enter day number between 2 & 365 : ‘))
d = input(‘Enter first day of the year : ‘)
l = [‘Sunday’, ‘Monday’, ‘Tuesday’, ‘Wednesday’, ‘Thursday’, ‘Friday’, ‘Saturday’]
print(l[l.index(d) + x%7 – 1]) # index() finds the index of d in the list l, x%7 because days are same every 7 days