Read month and returns season for that month.

In this python if else program, we will read month and returns season for that month.

Condition for the season:
Summer – February, March, April, May
Rainy – June, July, August, September
Winter – Octomber, November, December, January

Steps to solve the program
  1. Read the month from the user.
  2. Using an if-else statement print the season for the input month
				
					month = input("Enter a month: ")

if month == "February" or month == "March" or month == "April" or month == "May":
    print("Summer")
elif month == "June" or month == "July" or month == "August" or month == "September":
    print("Rainy")
else:
    print("Winter")
				
			

Output :

				
					Enter a month: February
Summer
				
			

Related Articles

check whether a triangle is isosceles or not.

check whether the input number is a float or not if yes then round up the number to 2

Leave a Comment