Total Score: 39/50 image

Question 11:

image

The answer is A since the value of input A is true which means the value from the OR gate is true, since the final outfut is true the value of input B didn’t affect the result

Question 12:

image

The answer is B since both conditions don’t need to be satisfied in order for the elevator to work since the elevator needs to be on a different floor from which it’s called

Question 14:

image

The answer is A since the output is true making it so that the input value of A must be true in order for that to occur

Question 15:

image

The answer is D since it requires the robot to rotate left in order to reach the goal but it will rotate right since it comes before rotate left

Question 21:

image

The answer is D since it’s an infinite loop since i is set to one every code is looped making it so that it never reaches i=4

Question 27:

image

The answer is D since it’s the only option that increases the distance the robot moves horizontally while keeping the vertical distance traveled the same

Question 30:

image

The answer is B and C instead of C and D since the circles all have the same x-position of 4 and it’s only the y-position and radius changing

Question 32:

image

The answer is C since program 1 the value of i starts at 1 and finishes at n so that result has the sum of all values from 1 to n while in program 2 the value of i starts at n and finishes at 1 so that result has the sum of all values from n to 1 which makes both o fthem have the correct sum

Question 33:

image

The answer is C since in algorithm 1 the max value would be -1 and not change while in algorithm 2 the inital would have a max of -7 but change the max value in all cases returning the correct max value

Question 45:

image

The answer is C since heuristic is any approach to problem solving that is practical but isn’t guaranteed to be optimal but is sufficient for reaching an immediate or short-term goal

Question 49:

image

The answer is D since some problems, such as determining if any program will eventually stop, cannot be solved by an algorithm