Write a Python program that reads a month name and prints its season (Indian seasons: Winter Dec-Feb, Summer Mar-May, Monsoon Jun-Sep, Post-monsoon Oct-Nov).
Input
"February", "May", "August", "October"
Output
February -> Winter
May -> Summer
August -> Monsoon
October -> Post-monsoon
February -> Winter
May -> Summer
August -> Monsoon
October -> Post-monsoon
Line by line
Lines 3-10
Each elif checks one season’s months.
Line 11
A final return covers anything that matched no season.
Note
The original sample said February is Summer. Season boundaries vary by country; this solution uses the common Indian classification with February in Winter.
Learn the concept
New to this topic? Read the lesson, then come back.