generated from CambridgeEngineering/PartIA-Flood-Warning-System
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Task1D.py
27 lines (23 loc) · 796 Bytes
/
Task1D.py
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
from floodsystem import geo
from floodsystem import stationdata
def run():
"""Requirement for Task 1D"""
rivers = geo.rivers_with_station(stationdata.build_station_list())
print(len(rivers), "stations. First 10 - ", sorted(rivers)[:10])
RA = []
print('River Aire')
for i in geo.stations_by_river(stationdata.build_station_list())["River Aire"]:
RA.append(i.name)
print(sorted(RA))
RC = []
print('River Cam')
for j in geo.stations_by_river(stationdata.build_station_list())["River Cam"]:
RC.append(j.name)
print(sorted(RC))
RT = []
print('River Thames')
for k in geo.stations_by_river(stationdata.build_station_list())["River Thames"]:
RT.append(k.name)
print(sorted(RT))
if __name__ == "__main__":
run()