Question 1

  • The correct answer: D. x = 3, y = 2, z = 1, My answer: I selected option A, where x=1, y=2, and z=3, which operates correctly with the code. However, the question asked for the values that cause the code to not function properly.

Question 6

  • I chose option C and the correct answer was D because the expression (num MOD 2) will compute the remainder when num is divided by 2. This code fragment works as intended.

Question 7

  • I chose option A which was change all occurences of “goats” to “sheep” first and change occurences after but the correct answer was option C because it had 3 steps in it but the one I chose only had two, whereas in the answer I chose they forgot to include changing Foxes to Sheep.

Question 11

  • I chose option C which was false because if input B is false, the resulting value coming out of the OR gate will be true (since the value of A is true). Since the value of C is true, the resulting value coming out of the AND gate is true. This result contradicts the statement.

Question 13

  • I chose option A which was II only and the correct answer was option D as it was II and III only because options II and III provide ( age > 16 ) and ( NOT (AGE>18))

Question 14

-I chose option C which was that the Input A could be true or false, correct answer was option A because it must be true in order for the function to fully run. If it is false than the function would stop

Question 16

  • The option I selected (B) is incorrect because it only scans the list, whereas the correct option (C) is accurate because it selects distinct values to be summed up.

Question 45

-The selection of option A is incorrect as a heuristic approach involves finding an approximate solution instead of a precise one. This is utilized in situations where it is not feasible to solve a problem using an algorithm within a reasonable time frame. Hence, option C is the correct choice.

Question 47

-The answer choice I selected (D) is incorrect, as sorting a list of numbers can typically be performed with a precise outcome and in a reasonable amount of time. The correct answer is (C) because a program to find the quickest driving route between two points can’t be calculated within a reasonable time frame as there are an infinite number of routes. However, an approximate solution is acceptable as it doesn’t have significant consequences.

Question 49

The incorrect answer choice (B) assumes that all problems can be solved by a computer given enough time and an algorithm, but this is not the case. There are some problems that cannot be solved, hence why answer choice (D) is the correct one.

What I will do to improve

  • I will spend a lot more time watching videos and understanding the concepts better
  • I will ask peers for help when needed and not fall behind on any projects or assignments

Reflection

Overall, I think I did really bad on this quiz and I think that I need to study more on certain topics and spend more time watching the videos that each section has attached to them.