Answer:
Explanation:
The result structure that we are to use to arrange this program needs to have the ability to differentiate paths depending on way of 8 different inputs that is given (one for every day of the week and another one incase the input is outside the range it's supposed to be in). A group of nested “if” statements should work but would be horribly complicated in looking. A much more innovative approach is to use an if - elif - else structure:
user_input = input('Enter a number: ')
if user_input == '1':
print(user_input, '= Monday')
elif user_input == '2':
print(user_input, '= Tuesday')
elif user_input == '3':
print(user_input, '= Wednesday')
elif user_input == '4':
print(user_input, '= Thursday')
elif user_input== '5':
print(user_input, '= Friday')
elif user_input== '6':
print(user_input, '=Saturday')
elif user_input == '7':
print(user_input, '=Sunday')
else:
print('Error: That number doesn\'t correspond to a day of the week.')