HW03 - US presidents’ Height
At the end of the file Computation-on-arrays-aggregates.ipynb, we have an example about the height of America’s presidents.
With the following command, you can have their names in the form of a list:
names = list(data['name'])
Get the following with one program:
- How many American presidents were less than 180 cm tall?
- How tall was Roosevelt? You have to look for the Roosevelt(s) with the program, not look through the list yourself
- Who was the tallest President of the America?
- Which US president holds the ordinal position of being the tallest?
- Which presidents have been taller than Obama? (print their names)
- Which presidents had same height? Print each group that was the same height separately. You should not have groups of one person.
- Display a bar graph of their height. The vertical axis of the president’s name and the length of the bar should indicate his height. The order of the vertical axis should be the same as the original order of the data.