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 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
Get step-by-step solutions from verified subject matter experts
