-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtemperatures
More file actions
30 lines (21 loc) · 722 Bytes
/
temperatures
File metadata and controls
30 lines (21 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
temp = [33,66,65,0,59,60,62,64,70,76,80,69,80,83,68,79,61,53,50,49,53,48,45,39]
hight =[]
fahr = []
print ('min & max : ',min(temp),',', max(temp))
for i in temp:
if i >= 70:
hight.append(i)
print('high temperatures list :',hight)
print('average :',sum(temp)/len(temp))
print('average hour 3 :',(temp[2]+temp[4])/2)
for j in temp:
fahr.append(1.8*(j)+32)
print ('fahrenheit temps :',fahr)
# looking for code : if 4 items in temp > 70 | if 1 item > 80 | if all items' average > 65
# above_seventy =0
# for k in temp: if k>70 : above_seventy += 1
# if above_seventy >= 4 : True
for k in temp:
if k > 80 | (sum(temp)/len(temp) > 65):
print('True')
# if i, i+1, i+2, and i+3are in range (i:i+4), True