Question: CSV FILE SCREENSHOT (CONTAINS DATA UNTIL LINE 101) ~~~~ 2. (15 points) The file heights.csv contains the heights of a group of people (in cm).
CSV FILE SCREENSHOT (CONTAINS DATA UNTIL LINE 101)

~~~~

2. (15 points) The file heights.csv contains the heights of a group of people (in cm). (a) Use the csv module to load the data (excluding the column names) into a built-in Python data structure d so that it would be the fastest for retrieving the height(s), given a name. Note that this file contains duplicate names. You may assume that the file is located in the same folder as this Notebook. In [ ]: # Remember to run this cell # DO NOT DELETE import csv In [ ]: # put your code here Test your data structure by running the following cell. It should print [164.2701631, 170.6630233] (or (170.6630233,164.2701631]) [183.0154074] In [ ]: # Test your code here # DO NOT DELETE print(d["Aidan"]) print(d["Dalton" ]) (b) Using the data stored in d, write code to find the three tallest persons and print their names. In [ ]: # put your code here A B C D E F G I 1 Name |Height 2 Henry 193.415 3 Blaze 186.8591 4 Daquan 165.291 5 Julian 172.175 6 Reuben 155.5116 7 Macon 155.713 8 Jason 175.3531 9 Ryder 176.0731 10 Rahim 168.2545 11 Omar 180.548 12 Aidan 164.2702 13 Fitzgerald 174.9473 14 Allistair 183.9921 15 Colin 165.3389 16 Emmanue 192.2229 17 Lev 192.5245 18 Amos 179.9101 19 Anthony 192.8114 20 Ryan 186.5522 21 Ashton 203.6127 22 Dillon 188.8192 23 Alec 182.6216 24 Luke 168.9365 25 Isaiah 179.6611 26 Quinlan 191.6341 27 Lucian 137.7282 28 Randall 173.3988 29 Upton 192.3834 30 Cadman 160.0676 31 Steven 187.8758 32 Macon 170.6276 33 Erasmus 172.5032 34 Anthony 171.7038 35 Dale 179.5763 36 Nathaniel 192.3271 88 Philip 193.3349 89 Basil 179.5719 90 Giacomo 176.2887 91 Hammett 172.8901 92 Demetriu: 185.0797 93 Howard 189.3555 94 Kasimir 167.729 95 Phelan 175.5451 96 Hunter 185.5566 97 Xanthus 194.2181 98 Octavius 182.7335 99 Conan 180.2384 100 Raphael 166.4646 101 Kermit 198.3757 102 103 104 105 106 107 108 109 110 111
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
