145 if 100 print gas elif 99 print water elif print ice 1a agregate if

 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
31
32
33
34
# 1
a = 145
if a >= 100:
print('gas')
elif 1 <= a <= 99:
print('water')
elif a <= 0:
print('ice')
# 1a
agregate = ''
if a>=100:
agregate = str(abs(100 - a)) + ' on top of boiling'
elif 1 <= a <= 99:
agregate = str(abs(a-100)) + ' to gas'
elif a <= 0:
agregate = str(abs(a - 0)) + ' to water'
print(agregate)
# 2
my_list = [1, 2, 3, 4, 5, 6, 7, 8]
odd = []
for elem in my_list:
if elem % 2 == 1:
odd.append(elem)
print(odd)
# 2a
print(len(odd))
# 2b
print(sum(odd))