image

Question 2

Which of the following has the greatest potential for compromising a user’s personal privacy?

Wrong Answer: B

  • The IP address of a user’s computer is required for the user to send and receive information on the Internet. The IP address in itself does not contain any extra information about the user.

Right Answer: A

  • The aggregation of information in browser cookies can be used by websites that the user visits to track the user and collect information about the user.

Question 10

Which of the following activities poses the greatest personal cybersecurity risk?

Wrong Answer: A

  • Public key encryption is widely used because of the functionality it provides in addressing cybersecurity issues when sending information across the Internet.

Right Answer: C

  • As an email message passes through the Internet, it goes through intermediate computers and routers. These computers and routers could read the contents of the email. The credit card number could be read from the email.

Question 12

Which of the following is LEAST likely to indicate a phishing attack?

Wrong Answer: B

  • Emails that request the user to click on an unknown link, as well as requests to share password information, are indicative of a phishing attack.

Right Answer: A

  • Phishing attacks are characterized by a communication from a person trying to trick another person into divulging personal information. Because the phone number on a bank card is public information and not personal, this request does not indicate a phishing attack.

Question 29

Consider the following code segment. The figure presents eight blocks of code that consist of 8 total lines. Line 1: [begin block] a ← true [end block] Line 2: [begin block] b ← false [end block] Line 3: [begin block] c ← true [end block] Line 4: [begin block] a ← [begin block] NOT [begin block] a OR b [end block] [end block] AND c [end block] Line 5: [begin block] c ← c AND a [end block] Line 6: [begin block] DISPLAY [begin block] a [end block] [end block] Line 7: [begin block] DISPLAY [begin block] b [end block] [end block] Line 8: [begin block] DISPLAY [begin block] c [end block] [end block] What is displayed as a result of executing the code segment?

Wrong Answer: C

  • The fourth statement assigns the value false to a. The fifth statement assigns the value false to c.

Right Answer: B

  • The first three statements assign values to the variables. The fourth statement assigns the value of (NOT (a OR b)) AND c to a. Since a OR b is true, NOT (a OR b) is false, so (NOT (a OR b)) AND c is false. The fifth statement assigns the value of c AND a to c. Since a is now false, c AND a is false. The last three statements display the values of the variables.

Question 35

Three teams (Team A, Team B, and Team C) are participating in a trivia contest. Let scoreA represent the number of correct questions for Team A, scoreB represent the number of correct questions for Team B, and scoreC represent the number of correct questions for Team C. Assuming no two teams get the same number of correct questions, which of the following code segments correctly displays the team with the highest number of correct questions?

Wrong Answer: D

  • For example, when scoreB > scoreC > scoreA, the code segment incorrectly identifies Team C as the winner instead of Team B.

Right Answer: A

  • If scoreA is greater than both scoreB and scoreC (the first two IF clauses), then Team A wins. If scoreA is greater than scoreB but not greater than scoreC, then scoreC is greater than both scoreA and scoreB and Team C wins. If scoreB is greater than scoreA (the outer ELSE clause) and scoreC (the IF clause in the outer ELSE), then Team B wins. If scoreB is greater than scoreA but not greater than scoreC, then scoreC is greater than both scoreA and scoreB and Team C wins.

Question 38

Consider the following code segment with an integer variable num.

IF(num > 0)

{

DISPLAY(“positive”)

}

IF(num < 0)

{

DISPLAY(“negative”)

}

IF(num = 0)

{

DISPLAY(“zero”)

}

Which of the following code segments is equivalent to the code segment above?

Wrong Answer: A

  • The given code segment displays “positive” when num is positive, displays “negative” when num is negative, and displays “zero” when num is 0. This code segment does not produce the same result for all values of num. For example, “positive zero” is displayed when num is 0.

Right Answer: B

  • The given code segment displays “positive” when num is positive, displays “negative” when num is negative, and displays “zero” when num is 0. This code segment produces the same result. When num is negative, “negative” is displayed. Otherwise, when num is 0, “zero” is displayed. Otherwise, “positive” is displayed.

Question 39

The following question uses a robot in a grid of squares. The robot is represented as a triangle, which is initially facing toward the top of the grid.

The figure presents a robot in a 5 by 5 grid of squares. The robot is represented by a triangle, which is initially located in the second square from the left in the fourth row, facing upward. The following code segment moves the robot around the grid. Assume that n is a positive integer.

Line 1: count ← 0

Line 2: REPEAT n TIMES

Line 3: {

Line 4: REPEAT 2 TIMES

Line 5: {

Line 6: MOVE_FORWARD()

Line 7: }

Line 8: ROTATE_RIGHT()

Line 9: }

Consider the goal of modifying the code segment to count the number of squares the robot visits before execution terminates. Which of the following modifications can be made to the code segment to correctly count the number of squares the robot moves to?

Wrong Answer: C

  • Inserting this statement between lines 6 and 7 increases the value of count once for each iteration of the outer loop, which results in count being half as large as it should be.

Right Answer: A

  • Inserting this statement between lines 6 and 7 increases the value of count once each time the robot moves forward, which keeps an accurate count of the number of squares the robot visits.

Question 49

A city planner is using simulation software to study crowd flow out of a large arena after an event has ended. The arena is located in an urban city. Which of the following best describes a limitation of using a simulation for this purpose?

Wrong Answer: D

  • In order to validate the predicted results of a simulation, observed data may be needed for comparison purposes. However, running a simulation does not require observations before it can be used.

Right Answer: B

  • Simulations are limited by the model that is used. There may be many reasons for using a simplified model, including ease of implementation.