Graduates Sort Example 2
This example shows filtering by salary and then sorting by salary.
$ python3 sort_graduates.py Please select one of the following choices: (1) Filter records by major (2) Filter records by mean salary (3) Sort by year (4) Sort by mean salary (5) Reset list to all records (0) Quit Choice? 2 Minimum mean salary? 100000 Maximum mean salary? 150000 13 found CHEM93:Chemistry, 1993. Mean salary: $148872.0. Total graduates: 507616. Total employed graduates: 406585 CHEN15:Chemical Engineering, 2015. Mean salary: $107650.53. Total graduates: 327140. Total employed graduates: 275712 CHEN93:Chemical Engineering, 1993. Mean salary: $126176.52. Total graduates: 211875. Total employed graduates: 174210 CIVL93:Civil Engineering, 1993. Mean salary: $129070.55. Total graduates: 336366. Total employed graduates: 288237 CSM93:Computer Science and Math, 1993. Mean salary: $134299.53. Total graduates: 1070111. Total employed graduates: 938124 ECON15:Economics, 2015. Mean salary: $109940.97. Total graduates: 1302458. Total employed graduates: 1046569 ELEC13:Electrical Engineering, 2013. Mean salary: $101808.12. Total graduates: 1003084. Total employed graduates: 850292 ELEC15:Electrical Engineering, 2015. Mean salary: $109173.61. Total graduates: 1154661. Total employed graduates: 939944 ELEC93:Electrical Engineering, 1993. Mean salary: $113262.51. Total graduates: 653614. Total employed graduates: 547402 MANA93:Management & Administration, 1993. Mean salary: $124761.62. Total graduates: 257809. Total employed graduates: 247056 MECH93:Mechanical Engineering, 1993. Mean salary: $119635.9. Total graduates: 512533. Total employed graduates: 424399 OENG93:Other Engineering, 1993. Mean salary: $145709.93. Total graduates: 704259. Total employed graduates: 581866 OPRS15:Operations Research, 2015. Mean salary: $117084.88. Total graduates: 18305. Total employed graduates: 14838 Please select one of the following choices: (1) Filter records by major (2) Filter records by mean salary (3) Sort by year (4) Sort by mean salary (5) Reset list to all records (0) Quit Choice? 4 13 found ELEC13:Electrical Engineering, 2013. Mean salary: $101808.12. Total graduates: 1003084. Total employed graduates: 850292 CHEN15:Chemical Engineering, 2015. Mean salary: $107650.53. Total graduates: 327140. Total employed graduates: 275712 ELEC15:Electrical Engineering, 2015. Mean salary: $109173.61. Total graduates: 1154661. Total employed graduates: 939944 ECON15:Economics, 2015. Mean salary: $109940.97. Total graduates: 1302458. Total employed graduates: 1046569 ELEC93:Electrical Engineering, 1993. Mean salary: $113262.51. Total graduates: 653614. Total employed graduates: 547402 OPRS15:Operations Research, 2015. Mean salary: $117084.88. Total graduates: 18305. Total employed graduates: 14838 MECH93:Mechanical Engineering, 1993. Mean salary: $119635.9. Total graduates: 512533. Total employed graduates: 424399 MANA93:Management & Administration, 1993. Mean salary: $124761.62. Total graduates: 257809. Total employed graduates: 247056 CHEN93:Chemical Engineering, 1993. Mean salary: $126176.52. Total graduates: 211875. Total employed graduates: 174210 CIVL93:Civil Engineering, 1993. Mean salary: $129070.55. Total graduates: 336366. Total employed graduates: 288237 CSM93:Computer Science and Math, 1993. Mean salary: $134299.53. Total graduates: 1070111. Total employed graduates: 938124 OENG93:Other Engineering, 1993. Mean salary: $145709.93. Total graduates: 704259. Total employed graduates: 581866 CHEM93:Chemistry, 1993. Mean salary: $148872.0. Total graduates: 507616. Total employed graduates: 406585 Please select one of the following choices: (1) Filter records by major (2) Filter records by mean salary (3) Sort by year (4) Sort by mean salary (5) Reset list to all records (0) Quit Choice? 0 Have a nice day!