From 49fbed1a18c4cdba736957f3869e871b9b89c580 Mon Sep 17 00:00:00 2001 From: Ronnie Kaito Imagawa Date: Wed, 10 May 2023 20:52:35 +0200 Subject: [PATCH] find week avg of temperatures --- .../4_HashTable_2_Collisions/Solution/nyc_weather.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 data_structures/4_HashTable_2_Collisions/Solution/nyc_weather.py diff --git a/data_structures/4_HashTable_2_Collisions/Solution/nyc_weather.py b/data_structures/4_HashTable_2_Collisions/Solution/nyc_weather.py new file mode 100644 index 0000000..3210646 --- /dev/null +++ b/data_structures/4_HashTable_2_Collisions/Solution/nyc_weather.py @@ -0,0 +1,12 @@ +import csv + +with open("data_structures\\4_HashTable_2_Collisions\Solution\\nyc_weather.csv") as csvfile: + reader = csv.reader(csvfile) + + info = [] + next(reader) + for row in reader: + info.append(int(row[1])) + +print(info) +print(sum(info[0:7])/ 7) \ No newline at end of file