Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 3 Write a program that asks the user for two integers representing the month [1,12] and the day [1,31] respectively. Your program should then

Problem 3

Write a program that asks the user for two integers representing the month [1,12] and the day [1,31] respectively. Your program should then output, which of the four seasons ("Winter", "Spring", "Summer", or "Fall") the entered date is in.

You should use the following date ranges for each season:

1. Spring: March 20th to June 20th

2. Summer: June 21st to September 22nd

3. Fall: September 23rd to December 20th

4. Winter: December 21st to March 19th

Hint: You can use logical operators and / or to combine multiple Boolean expressions. Otherwise you can use nested if/elif/else statements to check the combinations of different month and day ranges.

Some Outputs (user input highlighted)

Enter month [1,12]: 3

Enter day [1,31]: 19

It is Winter!

Enter month [1,12]: 3

Enter day [1,31]: 21

It is Spring!

use python

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions