MCQ 2 Test Corrections
A reflection of all the things I got wrong on the MCQ 2
This test, I got a 38/50, and these are all the questions that I got incorrect. I will go into detail on my thought process and how I can correct myself to not make these mistakes in the future.
Q1: This had to do with initial values that yield the incorrect value of max. I put "B," but the correct answer was D. My thought was that if Y was the highest value, then the incorrect value would be displayed. Looking back at the problem though, however, I realize why my thought process made no sense and decided that the best course of action would be to redo it. This was a fairly simply problem that I made a callous mistake.
Q8: I got one of the point right, where I said A and B, when the correct answers were A and D. I knew that the difference between borrows and returns is zeros, but I thought that since the borrows and returns are correlated with each other, the product of the two should theoretically be even, but then I forgot the multiplication can make odd numbers still, so that is why D is the correct answer.
Q13: I put B, I and II, but the answer was II and III only (D). Looking at the problem I see why. If someone is equal to or older than 16, then that means that they can be 18, and therefore satisfy both inequalities and still be able to vote and drive.
Q20: This question is incorrect. I put C for "flip_counter=2." IN the simulation, the variable flip_counter represents the number of times a coin was flipped. When the counter equals 2, only two coins could have flipped. This info does not lead to knowledge about the result of the simulation. Looking back at it, I think I should have gotten this problem correct, but I simply misread (maybe I was going to fast). Obviously, the flip counter tracks the amount of times the coin itself is flipped, but I mistook it for the amount of times heads was chosen. If heads is 2, that means that the other two HAVE to be tails. I need to make sure to read all of the answer choices correctly.
Q23: I was really confused on what this question was asking me. Looking at it, apparently they were trying to tell me what value is supposed to result in the execution of the algorithm (to stop), which of course would be 5. I thought it was asking me about all of the possible choices needed to create the outcome to be five until the algorithm finished, so I put C, 1234.
Q27: This question was also really simple. I chose A, but this outcome is incorrect because we put the initial value of n as 1. That means when n = n + 1, the first thing will be repeated 2 times rather than 1, resulting in it being the incorrect answer. The actual correct answer was D, where it gets rid of that that command and only adds 1 to n AFTER all the previous commands are ran.
Q28: I got one of the answers right and the other was wrong. The correct answer was A and C, but I put A and D. I thought D would work because C looked like it would repeat the movements 8 times, and would create a box. after drawing it out, I see that it actually makes sense because it moves forward and then turns left, but then since the final direction of the robot is facing a different direction, it can actually get to its intended destination.
Q32: I chose A for this, where Program I would work and II did not. In actuality, the two programs works, not just one. In program II, the value of i starts at na nd finishes at 1, so that result stores the sum of n + (n-1) ... + 3 + 2 + 1. Which is literally just backwards version of Program 1, that adds 1 + 2 + 3 ... + n.
Q39: This was a robot problem. I originally thought that the answer was B, but the actual answer is C. I understand why this so after taking a second glance. Because the robot can ONLY turn right, if I make it turn once (i thought it was turning back left), It will end up crashing into a wall. This makes sense and I have to understand constraints that exist.
Q41: I also totally understand why I got this problem wrong. I forgot how python works, where when choosing RANDOM, if I do random(1,10) = 2, that is only a 1/10 because it will be randomized for a certain number, and that number is 2. However, I thought that it meant to choose 2 votes, but that is not the case. I needed to choose D, where <= 2 means 1 and 2 or possibilities, which is now 20%
Q45: This question is simply me misunderstanding heuristic approaches towards predicaments. I thought that the problem needs to be solved in a reasonable amount of time and a approximation is acceptable, but apparently the problem cannot be solved in a reasonable amount of time and an approximate solution is acceptable.
Q48: Simply changing line 7 and 8 will make it so that the sum will only be calculated once. I did not really understand this problem because the code given was kind of confusing. But after knowing the answer, I now understand why it is more effective and therefore reduced the amount of operations performed.