rainfall = [2, 0, 5, 1]
total = 0
for amount in rainfall:
    total += amount
print(total)

for hour in range(0, 7, 3):
    print(hour)
for hour in range(6, 0, -3):
    print(hour)

hours = [9, 12, 15]
temperatures = [12, 18, 16]
for i in range(len(hours)):
    print(hours[i], temperatures[i])

temperatures = [3, -2, 7, 0, -1]
frost = []
for temperature in temperatures:
    if temperature <= 0:
        frost.append(temperature)
print(frost)

ranked = sorted(temperatures)
print(ranked[:2])
print(temperatures)

days = [[7, 12], [4, 15], [9, 18]]
all_temperatures = []
for day in days:
    for temperature in day:
        all_temperatures.append(temperature)
print(all_temperatures)

minutes = 3
while minutes > 0:
    print(minutes)
    minutes -= 1
print('take a reading')
