Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- above_20 = False
- for value in open("rainfall_Jan2016.txt"):
- value_float = float(value)
- if value_float > 20:
- above_20 = True
- if above_20:
- print("There was at least one day with 20mm or more rainfall.")
- else:
- print("There was no day with 20mm or more rainfall.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement