CS 1371 Exam 1 Form B Kelly Qiu TOTAL POINTS 99 / 100 QUESTION 1 1 1.1 MC 1 1 / 1 ✓ + 1 pts Invalid + 0 pts Valid or blank QUESTION 8 8 1.8 Scope Boxes 18 / 18 ✓ + 18 pts Correct + 2 pts Cmd Wdw-size->2 + 2 pts Cmd Wdw-temp->92 QUESTION 2 + 2 pts Cmd Wdw-time->150 2 1.2 + 2 pts create-size->92 FITB 1 1 / 1 ✓ + 1 pts function [pie, pie2] = Pies(in, out) NOTE: pies with a lowercase p is also acceptable + 0 pts Blank + 2 pts create-temp->2 + 2 pts create-time->150 + 2 pts prep-size->98 + 2 pts prep-temp->DNE QUESTION 3 + 2 pts prep-temp->DNE 3 1.3 + 0 pts All wrong MC 2 1 / 1 ✓ + 1 pts Invalid + 0 pts valid or blank QUESTION 4 4 1.4 FITB 2 1 / 1 ✓ + 1 pts function [mac, cheese] = costco(nickels) + 0 pts Blank QUESTION 9 9 2.1 FITB 5 / 5 ✓ + 5 pts Correct + 4 pts Value = [5 9 0 5 0 0] + 1 pts Class = double + 0 pts Incorrect QUESTION 5 QUESTION 10 5 1.5 10 2.2 MC 3 1 / 1 ✓ + 1 pts valid + 0 pts invalid or blank Short Answer 5 / 5 ✓ + 5 pts Correct + 3 pts Dimension Mismatch + 2 pts Any vector not length 1, 2, 3, 6 or 7 QUESTION 6 6 1.6 FITB 3 1 / 1 ✓ + 1 pts Blank + 0 pts Not blank + 0 pts Incorrect QUESTION 11 11 2.3 MC 1 5 / 5 ✓ + 5 pts All Correct: no 1, no 2, 3, 4 QUESTION 7 + 1 pts choice 1 not chosen 7 1.7 + 1 pts choice 2 not chosen MC 1 / 1 ✓ + 1 pts Correct: choice 1 + 0 pts incorrect + 1 pts choice 3 chosen + 1 pts choice 4 chosen + 0 pts all incorrect QUESTION 12 12 2.4 MC 2 5 / 5 ✓ + 5 pts Correct: choice 3 16 3.4 MC 1 4 / 4 ✓ + 4 pts Correct: choice 1 + 0 pts incorrect + 0 pts incorrect QUESTION 17 QUESTION 13 13 3.1 SC 1 8 / 8 ✓ + 8 pts Correct 17 3.5 MC 2 4 / 4 ✓ + 4 pts Correct: choice 4 + 0 pts incorrect + 0 pts Incorrect + 3 pts Mask 6 and above + 2 pts Put C's where mask + 2 pts Put R's where ~mask QUESTION 18 18 4.1 Long Coding 1 15 / 15 ✓ + 15 pts All Correct + 1 pts Final vector called gifts + 3 pts Properly Index Left Side (:, 1:end./3) - 1 pts Minor syntax error + 3 pts Store something in a temp variable - 4 pts Hardcoding + 3 pts Properly index right side (:, 2*end./3+1:end) - 1 pts Wrong class - 1 pts Forgets +1 on index + 0 pts Variable gifts undefined. + 2 pts Uses sort N is undefined QUESTION 14 14 3.2 SC 2 8 / 8 ✓ + 8 pts All Correct + 3 pts mask where gifts == oldscores + 3 pts mask where either gifts == 'C' or oldscores == 'C' + 2 pts Sum the mask (or length(find())) + 0 pts Incorrect - 1 pts Minor syntax error - 4 pts Hardcoding QUESTION 15 15 3.3 SC 3 5 / 6 ✓ + 6 pts All correct + 2 pts strtok() anywhere + 2 pts correctly strtok and store first word in word1 + 2 pts strtok rest and store second word in word2 + 0 pts Incorrect ✓ - 1 pts minor syntax error - 1 pts forgets second output of strtok - 3 pts hardcoding QUESTION 16 Page 2 + 1 pts Includes second output of sort + 1 pts Sorts bottom row (end, :) + 2 pts Uses second index of sort to rearrange - 1 pts Minor Syntax Error - 2 pts Puts stuff back in wrong + 0 pts All Wrong QUESTION 19 19 4.2 Long Coding 2 10 / 10 ✓ + 10 pts all correct + 2 pts correct function header, 1 output and 3 inputs + 1 pts str2num() anywhere + 1 pts Properly converts second index to numer ('7' -> 7) + 2 pts Properly converts letter to column value ('A' -> 1, many ways to do this) + 2 pts Moves piece correctly (row, col) + 2 pts Replaces old position with space - 1 pts Minor Syntax error + 0 pts Incorrect