This repository has been archived on 2026-03-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
pants/python/atms-310/homework/homework2.py
2026-03-18 00:46:30 -07:00

14 lines
296 B
Python
Executable File

import numpy
rainfall = [0.0, 0.1, 0.6, 0.7, 0.4, 0.3]
for n in range(len(rainfall)):
x = rainfall[n]*25.4
if x < 0:
raise ValueError(
'make sure no one is drinking out of the rainfall meter')
elif x >= 10:
print(x)
z = numpy.max(rainfall)
print(z*25.4)