Difference between revisions of "CSC111 Final Exam 2018"
(11 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[User:Thiebaut|D. Thiebaut]] ([[User talk:Thiebaut|talk]]) 11:39, 26 April 2018 (EDT) | [[User:Thiebaut|D. Thiebaut]] ([[User talk:Thiebaut|talk]]) 11:39, 26 April 2018 (EDT) | ||
---- | ---- | ||
− | + | ||
<bluebox> | <bluebox> | ||
* This is the final exam for CSC111, Spring 2018.<br /> | * This is the final exam for CSC111, Spring 2018.<br /> | ||
Line 15: | Line 15: | ||
* Make sure you list the resources you used to generate your code in your program header, if these resources are other than our textbook, or the notes and/or programs generated in class. | * Make sure you list the resources you used to generate your code in your program header, if these resources are other than our textbook, or the notes and/or programs generated in class. | ||
* Submit your code as soon as you have something running, in case you run into problems with your laptop, with the network, or with other unforeseen technical failures. | * Submit your code as soon as you have something running, in case you run into problems with your laptop, with the network, or with other unforeseen technical failures. | ||
+ | * All four problems are worth the same weight: 25% of the final grade. | ||
</bluebox> | </bluebox> | ||
<br /> | <br /> | ||
__TOC__ | __TOC__ | ||
<br /> | <br /> | ||
+ | <onlydft> | ||
<br /> | <br /> | ||
=Problem 1= | =Problem 1= | ||
Line 82: | Line 84: | ||
:::::<source lang="text"> | :::::<source lang="text"> | ||
> hello | > hello | ||
− | > | + | > blabla.txt |
> test2.csv | > test2.csv | ||
Line 93: | Line 95: | ||
:: Note that the program <font color="red">prints a blank line after getting a valid file name and before outputting the result.</font> | :: Note that the program <font color="red">prints a blank line after getting a valid file name and before outputting the result.</font> | ||
* Submit your program in the '''Final Exam PB 1''' section on Moodle. | * Submit your program in the '''Final Exam PB 1''' section on Moodle. | ||
+ | <br /> | ||
+ | ==Additional Information== | ||
+ | <br /> | ||
+ | * Lines that do not contain a '@' character should be considered invalid. | ||
<br /> | <br /> | ||
=Problem 2: An Orange Tree = | =Problem 2: An Orange Tree = | ||
Line 99: | Line 105: | ||
<br /> | <br /> | ||
* Modify the fractal tree program shown below so that it will generate an exact replica of the tree shown above. You should not reproduce the large grey text in the image; '''just the tree, its colors, its fruit, and the yellow box with your name in it'''. | * Modify the fractal tree program shown below so that it will generate an exact replica of the tree shown above. You should not reproduce the large grey text in the image; '''just the tree, its colors, its fruit, and the yellow box with your name in it'''. | ||
− | * Call your program '''final2.py''' and the image '''final2.jpg''' or '''final2.png'''. Submit both to | + | * Call your program '''final2.py''' and the image '''final2.jpg''' or '''final2.png'''. Submit both to the Final Examp PB 2 section on Moodle. |
* Note: To change the color of a '''line''' with the graphics library, you should use the '''setOutline()''' method rather than the '''setFill()''' method. To change the '''width''' of a line, you can use the '''setWidth()''' method. | * Note: To change the color of a '''line''' with the graphics library, you should use the '''setOutline()''' method rather than the '''setFill()''' method. To change the '''width''' of a line, you can use the '''setWidth()''' method. | ||
* I used only 3 colors to generate the tree above: "green", "blue", and "brown". | * I used only 3 colors to generate the tree above: "green", "blue", and "brown". | ||
Line 213: | Line 219: | ||
Run your program on the following image, and submit a copy of the processed image under the name '''finalb.jpg''' or '''finalb.png'''. Add a rectangle with your name inside it, so that the image can be easily identified. Failure to add the name will result in losing some valuable points. | Run your program on the following image, and submit a copy of the processed image under the name '''finalb.jpg''' or '''finalb.png'''. Add a rectangle with your name inside it, so that the image can be easily identified. Failure to add the name will result in losing some valuable points. | ||
<br /> | <br /> | ||
− | <center>[[File:SmithCollegeStainedGlass. | + | <center>[[File:SmithCollegeStainedGlass.gif|300px]]<br />(click on the image twice to get to the real full size image)</center> |
<br /> | <br /> | ||
==Implementation Details== | ==Implementation Details== | ||
<br /> | <br /> | ||
− | * The circular part of the mask should be as | + | * The circular part of the mask should be as large as the width or the height of the image, whichever is smaller |
* The mask color '''must''' be white. | * The mask color '''must''' be white. | ||
* The resulting image should be fully white outside the circular mask. | * The resulting image should be fully white outside the circular mask. | ||
Line 324: | Line 330: | ||
</source> | </source> | ||
+ | ==Additional Information== | ||
+ | <br /> | ||
+ | * You cannot use the "in" operator in your recursive function to test if an item is inside the list. | ||
+ | <br /> | ||
==Submission== | ==Submission== | ||
<br /> | <br /> | ||
Line 330: | Line 340: | ||
<br /> | <br /> | ||
<br /> | <br /> | ||
+ | =Information Released After the Deadline= | ||
<br /> | <br /> | ||
+ | ===Problem 1=== | ||
<br /> | <br /> | ||
+ | The first program was tested with several files: | ||
+ | :test0.csv | ||
+ | email, major1, major2, minor | ||
+ | :test1.csv | ||
+ | email, major1, major2, minor | ||
+ | Flo872@hampshire.edu,RUL,, | ||
+ | Joe999@smith.edu,ECO,, | ||
+ | Anna33@amherst.edu,CSC,, | ||
+ | Mana00@mtholyoke,EAS,, | ||
+ | :test2.csv | ||
+ | email, major1, major2, minor | ||
+ | Flo872@hampshire.edu,RUL,ECO, | ||
+ | Joe999@smith.edu,ECO,RUL, | ||
+ | Anna33@amherst.edu,CSC,RUL, | ||
+ | Mana00@mtholyoke.edu,EAS,, | ||
+ | Annya@umass.edu,RUL,CSC, | ||
+ | :test3.csv | ||
+ | email, major1, major2, minor | ||
+ | Flo872@smith.edu,RUL,, | ||
+ | Joe999@smith.edu,RUL,, | ||
+ | Anna33@smith,RUL,, | ||
+ | Mana00@smith.edu,RUL,, | ||
+ | Annya@smith.edu,RUL,, | ||
+ | |||
+ | * There was also a test where an invalid file name was provided to the program. | ||
+ | * The grade was automatically set to 65/100 if the program crashed on any of the input files. | ||
+ | * Points were removed for lack of documentation, or for not using several functions. | ||
+ | |||
+ | <br /> | ||
+ | ===Problem 4=== | ||
<br /> | <br /> | ||
+ | Problem 4 was tested with several lists: | ||
+ | [ ] | ||
+ | [ 1 ] | ||
+ | [ 1, 2 ] | ||
+ | [ 3, 3 ] | ||
+ | [ 2, 3, 4, 5, 6, 7, 8, 9 ] | ||
+ | [ 2, 3, 2, 3, 2, 3, 2, 3 ] | ||
+ | [ 2, 3, 4, 5, 6, 7, 8, 8 ] | ||
+ | [ 2, 3, 4, 5, 2, 3, 4, 5 ] | ||
<br /> | <br /> | ||
+ | * The grade was automatically set to 65/100 if the program crashed on any of the input files. | ||
+ | * Points were removed for lack of documentation, or for solutions that used iteration (for-loop) in the function. | ||
+ | |||
<br /> | <br /> | ||
+ | <br /> | ||
+ | </onlydft> | ||
<br /> | <br /> | ||
<br /> | <br /> | ||
Line 354: | Line 410: | ||
<br /> | <br /> | ||
<br /> | <br /> | ||
− | |||
<br /> | <br /> | ||
<br /> | <br /> | ||
Line 368: | Line 423: | ||
<br /> | <br /> | ||
− | + | ||
[[Category:CSC111]][[Category:Exam]] | [[Category:CSC111]][[Category:Exam]] |
Latest revision as of 12:35, 1 June 2018
D. Thiebaut (talk) 11:39, 26 April 2018 (EDT)
- This is the final exam for CSC111, Spring 2018.
- The deadline to submit your programs is May 11, 4 p.m. Please make note of the different submission time of day.
- This exam has to be done individually, and is given under the rules of the Smith Honor Code. You are not allowed to work in pairs on any part of this exam.
- You are not allowed to discuss any of the details of this exam, except with your instructor, D. Thiebaut
- You can ask questions on Piazza only. Do not post code on Piazza. If you think you may be giving away part of the solution when expressing your question on Piazza, make it private.
- Do not answer questions posted by others on Piazza; only your instructor is allowed to answer questions.
- The TAs and lab instructor will not be available to help out on this exam.
- You have to do the debugging of your code on your own.
- Two problems will be auto-graded on Moodle. The autograder is setup to only run your program on a small subset of cases, without generating a grade. You must test your program thoroughly to make sure it will pass all the tests that will be used to fully evaluate your program.
- A whole letter-grade will be removed for poorly documented code.
- Make sure you list the resources you used to generate your code in your program header, if these resources are other than our textbook, or the notes and/or programs generated in class.
- Submit your code as soon as you have something running, in case you run into problems with your laptop, with the network, or with other unforeseen technical failures.
- All four problems are worth the same weight: 25% of the final grade.