gram is an int that represents month number ( - )and the output is the abbreviation for the corresponding month for exampleif the input is then the output should be marfor march at firstit might seem that this program is beyond your current ability experienced programmers recognize that this is decision problem that iswe have to decide which of different outputs is appropriatebased on the number given by the user we will not cover decision structures until laterhoweverwe can write the program now by some clever use of string slicing the basic idea is to store all the month names in big string months "janfebmaraprmayjunjulaugsepoctnovdecwe can lookup particular month by slicing out the appropriate substring the trick is computing where to slice since each month is represented by three lettersif we knew where given month started in the stringwe could easily extract the abbreviation monthabbrev months[pos:pos+ this would get us the substring of length three that starts in the position indicated by pos how do we compute this positionlet' try few examples and see what we find remember that string indexing starts at month jan feb mar apr number position of coursethe positions all turn out to be multiples of to get the correct multiplewe just subtract from the month number and then multiply by so for we get ( and for we have ( now we're ready to code the program againthe final result is short and sweetthe comments document the algorithm we've developed month py program to print the abbreviation of monthgiven its number def main()months is used as lookup table months "janfebmaraprmayjunjulaugsepoctnovdecn eval(input("enter month number ( - )")compute starting position of month in months pos ( - grab the appropriate slice from months