Scoring

I scored a 44/50 on this test. There were somethings which I was confused on, but I was able to use a lot of skills which I learned before break.

Question 21

I answered C, that the loop would end up with the number 10 being displayed. However, I forgot to see that loop causes i to be reset to 1 every time, so it can never reach the value of 4. So the correct answer would be D, where the program loops forever.

Question 23

I originally selected the answer of D, where the count would displayed after every iteration. I did not take into account that the flowchart showed that count would only be displayed if it was over 5, so the correct answer would be A, 5.

Question 25

I selected the option that there would be an infinite loop if j=7, or the answer C. However, I missed the fact that j was initially 1, so that 2 would be added on every time to j. This meant that 7 would be a possible value for j, but 6 would not be. So, the correct answer would be j=6, or A.

Question 28

I got this question wrong because I did not select two options. I was planning to originally select A and C because they both would get the robot to the gray square, but I think I forget to select A. It is important to pay attention to my answers.

Question 32

I originally selected A for this problem, saying that only program 1 would get the correct answer. However, both programs would get the right answer for the question. I did not realize that the second program segment would add 1 to the program for every 1 in n(1 for 1, 2 for 2, 3 for 3, etc), and then would subtract 1 from n every time. So, this would end up yielding the same result as the other algorithm. This means that C, where both programs work, would be correct.

Question 45

  • Heuristic: In coding, getting a solution by trial and error, with loosely defined rules

I did not know what heuristic meant, so this taught me a new word. After going over the meaning, I realized that this is good when you cannot get the specific solution to a problem, but can get an approximate one. I originally answered that a heuristic approach would be good for a problem when it could be solved in reasonable time and an approximate solution is needed(A). However, you could solve this by just finding the exact solution, and don’t need trial and error. However, if you don’t know how long it will take for a solution to be found, you can use trial and error(a heuristic approach) to get an approximate solution. So, the answer would be C.

Reflection

I felt like a lot of my mistakes where things which I knew, I just had not checked over my work or problem properly. So, I should keep in mind to check over my answers carefully and to read the questions and diagrams carefully in order to ensure my success.