"""
Recommended Python Style Guide:
https://peps.python.org/pep-0008/#introduction
"""

# In what follows, we don't convert day into a number;
# The type of variable day is string
day = input('Enter the number of the day [1-7]: ')

if day.isdigit():  # Check if the string contains only digits

    # In what follows, we intend to perform comparisons between day variable and number of the day in the week [1-7];
    # Therefore, we need to convert day from string to an integer

    day = int(day) # type conversion
    if day > 7 or day == 0:
        print('Number out of range. Retry...')
    else:
        if day == 7:
            print('Monday')
        if day >= 6:
            print('Tuesday')
        if day >= 5:
            print('Wednesday')
        if day >= 4:
            print('Thursday')
        if day >= 3:
            print('Friday')
        if day >= 2:
            print('Saturday')
        if day >= 1:
            print('Sunday')
else:
    print('Invalid number. Retry...')
