Quiz Correction

  • Q8 Metadata about photos A smartphone stores the following data for each photo that is taken using the phone.

The answer is B because III. isn’t right, the name of the person who tool a photo isn’t captured in the photo data.

  • Q15 Internet communications characteristics

The answer is C because connecting new devices to the Internet is enabled by assignment of an IP address.

  • Q22 Procedure to determine the weather

The answer is B because this Boolean expression evaluates to true when the number of temperatures greater than or equal to 90 is greater than 50% of total.

  • Q23 Redundant routing with four computers

The correct answer is B because there is only one way to go from S to P.

  • Q30 Video-streaming service by genre

The correct answer is D because the procedure before calling four times inside the loop, it called once outside the loop.

  • Q34 Mouse and predator simulations

The answer is D because the number of predators is initialized at the beginning of the program but is never updated.

  • Q35 Musicians and copyright violations

The correct answer is D because a no-rights-reserved license allows others to freely make use of the samples.

  • Q37 Comparing code segments to compute average from list

The correct answer is C. Code segment I requires more arithmetic operations because it performs the operation sum divided by LENGTH, open parenthesis, num List, close parenthesis within the loop, while code segment II performs the same operation only once.

  • Q38 Frequent customers of a snack bar

The correction answer is C because the expression count, MOD, 10 equals 0 evaluates to true when count is a multiple of 1 0, and this code segment sets cost to 0 under the appropriate conditions.

  • Q50 Searching list target

The correct answer is B because the procedure implements a linear search, which sequentially compares each element of the list with the target value. And does not need to be sorted because the procedure checks list elements until either the target is found or it reaches the end of the list.

  • Q55 Results of the KeepPlaying procedure

The right answer is D because the response will always evaluates to false because the response can never be both y and yes.

  • Q58 Defining Internet enabled crowdsourcing

The correction is A because the internet aren’t able to solve a large input size is reasonable time.

  • Q65 Correcting errors in procedure Multiply

The correct anser is B and D because both B and D will give you a negative x and y and this code can’t run negative.

  • Q66 Test cases for procedure Smallest

The correct answer is C and D because the return of those two list aren’t the smallest number.