Difference between revisions of "CSC111 Homework 9 Solutions 2011"
(Created page with "--~~~~ ---- ==Problem #1== <onlydft> <source lang="python"> # hw9a.py # Julia Edwards # 111a-ak # This program takes the list of all the Presidents of the United States # and or...") |
(→Problem #2) |
||
Line 174: | Line 174: | ||
# example of output: | # example of output: | ||
# | # | ||
+ | """ | ||
+ | python3 elevator.py | ||
+ | Candidates for first boarding of elevator: | ||
+ | JT (150 lbs) | ||
+ | TJ (80 lbs) | ||
+ | TT (120 lbs) | ||
+ | BT (170 lbs) | ||
+ | |||
+ | Max weight? 400 | ||
+ | --- BATCH 1 --- | ||
+ | 3 people can board the elevator | ||
+ | Their combined weight is 350 | ||
+ | The selected group includes: JT, TJ, TT | ||
+ | The rejected group includes: BT | ||
+ | --- BATCH 2 --- | ||
+ | 1 people can board the elevator | ||
+ | Their combined weight is 170 | ||
+ | The selected group includes: BT | ||
+ | The rejected group includes: | ||
+ | |||
+ | """ | ||
CANDIDATES = "candidates.txt" | CANDIDATES = "candidates.txt" | ||