Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
The function must return the result of count
def comfort_count(temperatures):
count = 0
for temp in temperatures:
if 22 <= temp <= 26:
count += 1
returtn count
print(comfort_count(may_2017))
def comfort_count(temperatures):
return sum(1 for temp in temperatures if 22 <= temp <= 26)
def comfort_count(temperatures):
return sum(22 <= temp <= 26 for temp in temperatures)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question