Question: Weather Analyzer You are tasked with developing a Weather Analyzer that helps identify trends in daily temperatures. The user will input the recorded temperatures for

Weather Analyzer You are tasked with developing a Weather Analyzer that helps identify trends in daily temperatures. The user will input the recorded temperatures for several days, and your program will determine: The number of heat waves (3 or more consecutive days with temperatures above 30\deg C). The longest cold streak (number of consecutive days with temperatures below 15\deg C). The average temperature of the entire dataset. At the end, your program will display the results, including the days where heat waves and cold streaks occurred. Requirements: 1. The user will input the temperatures as a list of numbers (in Celsius), separated by spaces. 2. Use lists to store the temperatures and analyze the data. 3. Implement the following features: o Count heat waves: A heat wave is defined as 3 or more consecutive days where the temperature is above 30\deg C. o Find the longest cold streak: A cold streak is defined as consecutive days with temperatures below 15\deg C. You need to find the longest streak of such days. o Calculate the average temperature of all the days. 4. Example Input/Output: Sample Input 1: Enter temperatures for each day separated by space: 32333429121014252630313233 Sample Output 1: Number of heat waves: 2 Longest cold streak: 3 days Average temperature: 25.23\deg C Sample Input 2: Enter temperatures for each day separated by space: 10121416182025283032333435101112 Sample Output 2: Number of heat waves: 1 Longest cold streak: 3 days Average temperature: 20.94\deg C Hints: To find heat waves, you can loop through the list and check for 3 or more consecutive temperatures above 30\deg C. To find the longest cold streak, you will need to track the number of consecutive days below 15\deg C and update the longest streak accordingly. The average temperature can be calculated using the sum() function divided by the number of days

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!