Question: Write a function longest_heat_wave (temps) that accepts as input a list of numbers (temps) representing temperatures measures at consecutive days and that computes as output

 Write a function longest_heat_wave (temps) that accepts as input a list

Write a function longest_heat_wave (temps) that accepts as input a list of numbers (temps) representing temperatures measures at consecutive days and that computes as output the maximum number of consecutive days with temperature at least 30 degrees. For example: >>> longest_heat_wave ([10, 12, 20, 40, 39, 38, 30, 20, 35, 36]) 4 >>> longest_heat_wave ([20, 25, 31]) 1 >>> longest_heat_wave ([-1, 5, 10]) 0 Your program is not allowed to contain any imports

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 Databases Questions!