Write a function to return day of a week, given the number


Topic: Write a function to return day of a week, given the number

Solution

def give_day(n):
    day_dict = {1: 'Sunday', 2: 'Monday', 3: 'Tuesday', 4: 'Wednesday', 5: 'Thursday', 6: 'Friday', 7: 'Saturday'}
    return day_dict[n]



List all Python Programs