Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started