Answered step by step
Verified Expert Solution
Question
1 Approved Answer
7. Write a Python function that, given the month and day as whole numbers (integers), returns the season (Spring, Summer, Fall, or Winter). You can
7. Write a Python function that, given the month and day as whole numbers (integers), returns the season ("Spring", "Summer", "Fall", or "Winter"). You can use the following algorithm for your function: If month is 1, 2 or 3, season is "Winter" Otherwise, if month is 4,5 or 6, season is "Spring" Otherwise, if month is 7, 8 or 9, season is "Summer" Otherwise, if month is 10, 11 or 12, season is "Fall" If month is divisible by 3 and day 2 21: If season is "Winter", change season to "Spring" Otherwise, if season is "Spring", change season to "Summer" Otherwise, if season is "Summer", change season to "Fall" Otherwise, if season is "Fall", change season to "Winter" Paste your function definition with some sample outputs here
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started