Advertisement
Pixelizing

Untitled

Apr 23rd, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. above_20 = False
  2. for value in open("rainfall_Jan2016.txt"):
  3.     value_float = float(value)
  4.     if value_float > 20:
  5.         above_20 = True
  6. if above_20:
  7.     print("There was at least one day with 20mm or more rainfall.")
  8. else:
  9.     print("There was no day with 20mm or more rainfall.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement