Difference between revisions of "CSC111 Final Exam 2018"
Line 6: | Line 6: | ||
* Write a program that prompts the user for the name of a CSV file that contains the email addresses of 5-college students along with their major or double-major, and, possibly, their minor. | * Write a program that prompts the user for the name of a CSV file that contains the email addresses of 5-college students along with their major or double-major, and, possibly, their minor. | ||
* Here is a typical file: | * Here is a typical file: | ||
− | + | :::::<source lang="text"> | |
− | + | email, major1, major2, minor | |
− | + | Florance872@hampshire.edu,RUL,, | |
− | + | Nguyet929@umass.edu,REES,CSC,THE | |
− | + | Sol937@hampshire.edu,CSC,, | |
− | + | Loreen219@smith.edu,ITL,ENV, | |
− | + | Marquerite747@amherst.edu,DAN,,BUX | |
− | + | Alishia128@hampshire.edu,AMS,, | |
− | + | Nolan149@smith.edu,SAX,, | |
− | + | Xiao517@umass.edu,CSF,, | |
− | + | Lawerence246@smith.edu,JUD,, | |
− | + | Dominique1@smith.edu,ESS,,LALS | |
− | + | </source> | |
+ | <br /> | ||
* Write a python program that reads this type of CSV file, and outputs this information: | * Write a python program that reads this type of CSV file, and outputs this information: | ||
::* The most popular major. In this case both the first major and second major count. For example, if the 3 lines shown below, CSC is the most frequent major. | ::* The most popular major. In this case both the first major and second major count. For example, if the 3 lines shown below, CSC is the most frequent major. |