Score and Corrections

  • Score: 62/67

Question 3 Display Pattern

  • this question asks you to choose which algorithm displays “red red blue red red blue red red blue”
  • I answered the iteration that would provide red red red blue rather than red red blue because the repeat was switched
  • For this question I just need to be a little more careful on how fast I answer and really drawing out the code

Question 15 Comparing Output

  • I answered that Program A and B display the same values in differnt orders but really it is in the same order
  • . Program A initializes i to 1. Inside the loop, it prints i and then increments i. The loop terminates when i is greater than 10, which occurs after 10 is printed. Program A prints 1 2 3 4 5 6 7 8 9 10. Program B initializes i to 0. Inside the loop, it increments i and then prints i. The loop terminates when i equals 10, which occurs after 10 is printed. Program B prints 1 2 3 4 5 6 7 8 9 10.
  • They both increment to 10 so it is the same values
  • I don’t fully rememebr this question so I have a feeling I paused in the middle of it to do something else and then forgot about it and moved on

Question 37 Coordinate Grid

  • I chose that both x and y get the coordinate subtracted by 2 but I now realize that this would result in the wrong endpoints
  • The correct loop will repeatedly subtract two fron endY which results in the correct endpoints
  • I was a little iffy on this question so I’m not that surprised it was wrong

Question 41 TrimLeft and TrimRight

  • This question asks which statements will exact the correct description and store it in the string descr
  • I answered I only because it seemed that III but i now realize that it is doing almost exactly as I but just in the opposite order
  • collegeboard: It will first call TrimRight to remove the four rightmost characters (the file extension). It will then pass the result to TrimLeft, which will remove the eleven leftmost characters (the date tag), leaving only the desired description. Statement II is incorrect. It will first call TrimRight to remove the eleven rightmost characters, which includes more than just the file extension. It will then pass the result to TrimLeft to remove the four leftmost characters, which does not remove the entire date tag. Statement III is correct. It will first call TrimLeft to remove the eleven leftmost characters (the date tag). It will then pass the result to TrimRight, which will remove the four rightmost characters (the file extension), leaving only the desired description.

Question 50 Reasonable Time Algorithms

  • This question asks which algorithms will run in reasonable time given that n is a very large integer
  • The three options are: An algorithm that accesses each element in the list twice, An algorithm that accesses each element in the list n times, and An algorithm that accesses only the first 10 elements in the list, regardless of the size of the list
  • I answered the third one only because I was thinking logically rather than the computer science defintion
  • For an algorithm to run in reasonable time, it must take a number of steps less than or equal to a polynomial function which all of them do

Reflection

Overall this MC made me feel pretty confident in my csp skills. These MC are very diffrerent from the CSA ones that I had to do last year, which were all either following code and saying what the output would be, fixing code, and just very java orieneted. I think I have an upperhand because I took CSA last year so I am familiar with a lot of the basics. Its also interesting how some of the CSP questions are kind of common knowledge. For example, it asks about how to help the digital divide and the answers are very obvious. All in all, I am happy with my performance on the MC and feel pretty good about it.