Difference between revisions of "CSC111 Final Exam 2014"
Line 17: | Line 17: | ||
<br /> | <br /> | ||
=Problem #1 (50 points)= | =Problem #1 (50 points)= | ||
+ | <br /> | ||
+ | Store the code below in a file called '''finaltext.py'''. | ||
<br /> | <br /> | ||
<source lang="python"> | <source lang="python"> | ||
Line 43: | Line 45: | ||
</source> | </source> | ||
<br /> | <br /> | ||
− | The list above is a list of people, dogs, and cats. | + | The list above is a list of people, dogs, and cats. In order to use it in the program you have to write and that you will be submitting, simply add this line at the top of your program: |
+ | <br /> | ||
+ | <source lang="python"> | ||
+ | from finaltext import text | ||
+ | </source> | ||
+ | <br /> | ||
+ | |||
==Your Assignment== | ==Your Assignment== | ||
<br /> | <br /> | ||
− | Write a program that will read this string, parse it, store it in some data structure, and output the answers to the following questions: | + | Write a program called '''finala.py''' that will read this string '''text''', parse it, store it in some data structure, and output the answers to the following questions: |
;Question 1 | ;Question 1 | ||
:Print a list of all the people, nicely formatted, followed by a list of the dogs, followed by a list of the cats. An example of the format to use is shown below: | :Print a list of all the people, nicely formatted, followed by a list of the dogs, followed by a list of the cats. An example of the format to use is shown below: | ||
Line 81: | Line 89: | ||
* A maximum of 50 points will be given to well documented programs that answer all the questions and that use classes derived from the People and Dog classes of [[CSC111_Homework_10_2014#Problem_.232:_Of_dogs_and_people... | Problem 2 of Homework 10]]. In this case you must copy and not modify the two classes into your program, and create new classes derived from them. Feel free to organize your new classes as you feel will help you answer the questions the most easily. In other words, make life easy for yourself! | * A maximum of 50 points will be given to well documented programs that answer all the questions and that use classes derived from the People and Dog classes of [[CSC111_Homework_10_2014#Problem_.232:_Of_dogs_and_people... | Problem 2 of Homework 10]]. In this case you must copy and not modify the two classes into your program, and create new classes derived from them. Feel free to organize your new classes as you feel will help you answer the questions the most easily. In other words, make life easy for yourself! | ||
− | + | <br /> | |
+ | ==Submission== | ||
+ | <br /> | ||
+ | Submit the program '''finala.py''' at this [http://cs.smith.edu/~thiebaut/111b/submit14.php url]. | ||
<br /> | <br /> |