Grading for exam2 for 11:00 section --------------------------------- Paper part Note: I gave credit for showing work if I could find it somewhere on your paper, even if it wasn't circled, etc. 1a) 2.5 points total. -.5 if a single minor error (e.g., thinking -1 < -2) -.5 if did bubble sort instead of selection sort and did it correct. -1 if did some combination of bubble sort and selection sort, or did bubble sort but did it wrong. 0 if you didn't show any work. Note: -2 is < -1. 1b) 2.5 points total. If you made a mistake on just one letter I didn't take off. -.5 you shifted left by the wrong amount, but did it correctly. If you were shifting left, it should have been by 6. -.5 if you shifted left by 20, or right by 6. -1 if correct but no work shown. -2 if there was some work shown, but not doing the correct algorithm, or completely not clear what was going on. 1c) 2.5 points total. -.5 if you didn't have the 1's bit (which should have been 0). -.5 if you had one of the powers of 2 wrong but did everything right based on that wrong value (e.g., used 124 instead of 128). -.5 for each careless arithmetic mistake (e.g., 144-128 = 14). -1 if correct but no work shown. -1 if some part of your thinking was correct, but messed up part of it. Note: you've got to be able to do basic arithmetic without making lots of mistakes. 1d) 2.5 points total. -.5 if did everything correct but didn't actually say if it is prime or not. -1 if you claimed it was prime because you only tested up to 6. -1 you correctly said 91 = 7 * 21, but incorrectly said that meant it is prime. -2 if you only tried dividing by 2, or didn't do any divisions and did something strange. -2 if correcty answer (prime) but didn't have any work. 2a) 4 points total. -.5 if you just missed that i ends up being 4. -1 if i is correct and either total or x is correct, but the other is not. -1 if went once too far on the loop (ran it for i=4). -2.5 if i is correct but nothing else is. -3 last value of i was right, none of the other was right, and no work shown. -4 no work shown, no final values are correct, and not sure what you were doing. 2b) 3 points total. 1 point for getting the initial values in the f2 function correct (z=1, w=2) 1 point for getting the initial values in the f1 function correct (x=3, y=2) 1 point for everything else, and ending up with the correct values for things in main (everything is 0). -3 no actual values on the paper. 2c) 3 points total. -0 error on just one of the nums values. -.5 have nums getting 6 numbers instead of 5. -.5 have nums[0] being 1 initially rather than 0. -.5 nums correct all the way through, only had first loop values for i. -1 had everything correct after first for loop but messed up the second one. -1.5 completely correct sequence of values for i, but mistakes on nums. -2 correct values for i on the first loop, but not for anything else. -2.5 final value of i correct, nothing else is. ------------------------------------------------------- Computer Part Note: there should be a file grade.txt in your exam2 directory with what you got for each part. If you did not take the computer test, there is no grade.txt file, and you just got a 0 for it. 20 points total. 1) 10 points total. -1 one or more uninitialized variables. -1 sums are all off by 1. -2.5 Was correct, as evidence by correct compiled program, but there's an error in it now that you didn't fix. -2.5 Only final sum is computed/printed correctly. -2 Sums computed correctly, but only up to a fixed value, not up to what the user typed. -4 Loop goes through all the numbers from 1 up to what the user typed, but no sums are computed, or not at all correct. -7 Code compiles, but doesn't even have a loop. -7 Code does not compile, but it was a start (e.g., with a loop that showed the right idea). -9 Code does not compile, and is barely even a start (no loop, etc.). 2) 5 points total. Note: there was only 1 error in the file after all. Oops. -2.5 Fixed error so it compiles correctly, but doesn't run correctly. 3) 5 points total. -3 No error fixed, but did compile program so it is called small. -1.5 Fixed the error that was there, and it compiles. But you made some other error.