-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathpresidents.py
More file actions
19 lines (15 loc) · 835 Bytes
/
presidents.py
File metadata and controls
19 lines (15 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from date import date
from presidents_data import presidents_by_party
print('There have been presidents from {} different parties'.format(len(presidents_data)))
# TODO:
# * Display a report that answers the following questions:
# * Which party has had most presidents?
# * Who was the youngest Republican president when they took office?
# * Who was the oldest Democrat president when they took office?
# * Who was the youngest president (from any party) when they took office?
# * Who was the oldest president (from any party) when they took office?
# * Which month saw the most presidents take office?
# * Which decade saw the most presidents take office?
# * Which party has been in power for longest?
# * What is the average age of becoming president?
# * Which presidents have taken office more than once?