Write a program that takes a date as input and outputs the date's season. The input...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that takes a date as input and outputs the date's season. The input is a string to represent the month and an int to represent the day. Ex: If the input is: April 11 the output is: Spring In addition, check if the string and int are valid (an actual month and day). Ex: If the input is: Blue 65 the output is: Invalid The dates for each season are: Spring: March 20 - June 20 Summer: June 21- September 21 Autumn: September 22 - December 20 Winter: December 21- March 19 Write a program that takes a date as input and outputs the date's season. The input is a string to represent the month and an int to represent the day. Ex: If the input is: April 11 the output is: Spring In addition, check if the string and int are valid (an actual month and day). Ex: If the input is: Blue 65 the output is: Invalid The dates for each season are: Spring: March 20 - June 20 Summer: June 21- September 21 Autumn: September 22 - December 20 Winter: December 21- March 19
Expert Answer:
Answer rating: 100% (QA)
Python program to find the season of a date def getseasonmonth day Ge... View the full answer
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these programming questions
-
The purpose of this assignment is to analyze statistical tests and interpret the results. Review the "Health Care Research, Analysis, and Utilization Scenarios" document and select either the...
-
this should simulate the roulette game and when u lose it should double when u win it should stay the same u win when the spin land on odd and lose on even. it should import random and randon seed(5)...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
X-Tech Inc. produces specialized bolts for the aerospace industry. The operating cost of producing a single bolt is $2. The company currently sells the bolts for $6/unit. Each time the company...
-
Warranties the Dotson Company, owner of Bleacher Mall, charges Rich Clothing Store a rental fee of $600 per month plus 5% of yearly profits over $500,000. Matt Rich, the owner of the store, directs...
-
The following situations involve the application of the time value of money concept: a. Jan Cain deposited $19,500 in the bank on January 1, 1999, at an interest rate of 12% com-pounded annually. How...
-
Below are the financial statements for two entertainment firms, Crosby Co. and Prairie Inc. for 2017 and 2018 a. How did Crosby Co.s profit margins change from 2017 to 2018? To what would you...
-
Scan It Company manufactures computer scanners. The following table presents financial information for two years. a. Classify the above items into prevention, appraisal, internal failure, or external...
-
6. Consider two G.P.'s. 2, 22, 23, and 4, 4, 4, of 60 and n terms respectively. If the 225 n geometric mean of all the 60 + n terms is (2), then k(n-k) is equal to: (a) 560 (b) 1540 (c) 1330 (d) 2600
-
A. Steve Jackson (birthdate December 13, 1965) is a single taxpayer living at 3215 Pacific Dr., Apt. B, Pacific Beach, CA 92109. His Social Security number is 465-88-9415. In 2018, Steves earnings...
-
Managers and leaders must possess good communication skills in order to be successful and achieve their goals. However, there are many barriers to effective communication. Please describe five common...
-
Ron mailed his 2018 federal tax return on April 15, 2019, attaching only a first-class postage stamp. However, the postage should have been higher since the return weighed three ounces. His return is...
-
Karen engaged Joe, a CPA, to prepare her tax return. Karen received a refund check of $300 from the IRS. She endorsed the check and mailed it to Joe as payment for the preparation of her return. Joe...
-
Peter's return was examined and the result was additional tax of $16,000 due to unreported lottery winnings. Peter has received a letter notifying him of his right to appeal the proposed changes...
-
Reginald filed his 2018 income tax return on January 15, 2019. On November 1, 2019, he learned that his investment of $10,000 in 1,000 shares of Ultimate Corp. had become worthless in 2018. What is...
-
Melvin leases a building that he owns to his wholly-owned S corporation for $30,000 for the year. Melvin materially participates in the S corporation. What amount does Melvin have to report as net...
-
Homework: ML9 Score: 0 of 1 pt (X) 2.3.43 Consider the graph of g(x) shown below. (a) If g(x) is the first derivative of f(x), what is the nature of f(x) when x = 5? (b) If g(x) is the second...
-
Refer to the table to answer the following questions. Year Nominal GDP (in billions) Total Federal Spending (in billions) Real GDP (in billions) Real Federal Spending (in billions) 2000 9,817 578...
-
Write a program that animates a ball moving along a sine curve, as shown in Figure 15.32. When the ball gets to the right border, it starts over from the left. Enable the user to resume/pause the...
-
Write a program that enables the user to enter text and displays the Huffman coding tree based on the text, as shown in Figure 25.25a. Display the weight of the subtree inside the subtree?s root...
-
The Knight?s Tour is an ancient puzzle. The objective is to move a knight, starting from any square on a chessboard, to every other square once, as shown in Figure 18.15a. Note that the knight makes...
-
To become more skilled at interpreting meanings associated with nonverbal communication. INSTRUCTIONS Assume your boss exhibits each of the four behaviors listed below over the course of a month....
-
This exercise involves triads. Each triad counts off into threes: 1, 2, 3, 1, 2, 3, and so on. In the first round, all the 1s in their respective triads take the pro position (see the topics given...
-
To understand some of the specific activities that fall under the management functions of planning, organizing, controlling and staffing, and directing. INSTRUCTIONS Read the following case and then...
Study smarter with the SolutionInn App