Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. may_2017 = [24, 26, 15, 10, 15, 19, 10, 1, 4, 7, 7, 7, 12, 14, 17, 8, 9, 19, 21, 22, 11, 15, 19, 23, 15, 21, 16, 13, 25, 17, 19]
  2. may_2018 = [20, 27, 23, 18, 24, 16, 20, 24, 18, 15, 19, 25, 24, 26, 19, 24, 25, 21, 17, 11, 20, 21, 22, 23, 18, 20, 23, 18, 22, 23, 11]
  3.  
  4. # допишите код ниже
  5. def comfort_count(temperatures):
  6. count = 0
  7. for temp in temperatures:
  8. if 22 <= temp <= 26:
  9. count += 1
  10. print('Количество комфортных дней в этом месяце: ' + str(count))
  11.  
  12.  
  13. # дальше код не меняйте
  14. comfort_count(may_2017) # узнаем, что было в мае 2017 г.
  15. comfort_count(may_2018) # узнаем, что было в мае 2018 г.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement