Weekdays

Problem Description

Convert an integer that stands for the weekday into the three letter abbreviation for that day.

Analysis: You may have a string s="SunMonTueWedThuFriSat", and slice a substring s[n:n+3].


The program may run as follows.

Enter a weekday (0-6): 2
The weekday abbreviation is Tue.

Enter a weekday (0-6): 5
The weekday abbreviation is Fri.

Enter a weekday (0-6): 0
The weekday abbreviation is Sun.