The figure presents 5 lines of code, as follows.
Line 1: [begin block] first ← 100 [end block]
Line 2: [begin block] second ← 200 [end block]
Line 3: [begin block] temp ← first [end block]
Line 4: [begin block] second ← temp [end block]
Line 5: [begin block] first ← second [end block]
What are the values of first and second as a result of executing the code segment?
Responses:
A. first = 100, second = 100
B. first = 100, second = 200
C. first = 200, second = 100
D. first = 200, second = 200
My Selection: B
Correct Answer: C
Explanation: The variable second, while initially assigned the value 200, is later assigned the value of temp, which is 100.
Question: Which of the following best explains how an analog audio signal is typically represented by a computer?
Responses:
A. An analog audio signal is measured as input parameters to a program or procedure. The inputs are represented at the lowest level as a collection of variables.
B. An analog audio signal is measured at regular intervals. Each measurement is stored as a sample, which is represented at the lowest level as a sequence of bits.
C. An analog audio signal is measured as a sequence of operations that describe how the sound can be reproduced. The operations are represented at the lowest level as programming instructions.
D. An analog audio signal is measured as text that describes the attributes of the sound. The text is represented at the lowest level as a string.
Your selection: A
Correct Answer: B
Explanation: Audio signals are typically digitized by sampling them at regular intervals. Each sample is then represented as a sequence of bits.
Question: Which of the following is NOT a benefit of collaborating to develop a computing innovation?
Responses:
A. Collaboration can decrease the size and complexity of tasks required of individual team members.
B. Collaboration can make it easier to find and correct errors during the development process.
C. Collaboration eliminates the need to resolve differences of opinion.
D. Collaboration facilitates multiple perspectives in developing ideas.
Your selection: A
Correct Answer: C
Explanation: Collaboration doesn't necessarily eliminate differences of opinion, but it can help manage and resolve them effectively through communication and teamwork.
Question: Consider the following procedure.
Procedure Call: drawLine(x1, y1, x2, y2)
Explanation: Draws a line segment on a coordinate grid with endpoints at coordinates (x1, y1) and (x2, y2)
The drawLine procedure is to be used to draw the following figure on a coordinate grid:
[Description of the figure with 5 line segments and their coordinates]
Which of the following code segments can be used to draw the figure?
Your selection: C
Correct Answer: B
Explanation: This code segment correctly draws the figure by incrementing both x and y values to draw diagonal line segments.
Question: The figure below represents a network of physically linked devices labeled A through I. A line between two devices indicates that the devices can communicate directly with each other. Any information sent between two devices that are not directly connected must go through at least one other device.
How many connections need to be removed to prevent devices B and C from communicating directly?
Responses:
A. Three
B. Four
C. Five
D. Six
Your selection: A
Correct Answer: C
Explanation: Removing any three connections will not prevent devices B and C from communicating. For example, if connections A-C, C-D, and B-D are removed, then devices B and C can still communicate along the path B-E-F-C.
Question: Which of the following is a true statement about the use of public key encryption in transmitting messages?
Responses:
A. Public key encryption enables parties to initiate secure communications through an open medium, such as the Internet, in which there might be eavesdroppers.
B. Public key encryption is not considered a secure method of communication because a public key can be intercepted.
C. Public key encryption only allows the encryption of documents containing text; documents containing audio and video must use a different encryption method.
D. Public key encryption uses a single key that should be kept secure because it is used for both encryption and decryption.
Your selection: B
Correct Answer: A
Explanation: Public key encryption enables secure communications even through open mediums like the Internet, as it uses a pair of keys (public and private) for encryption and decryption, respectively. Even if the public key is intercepted, it doesn't compromise the security of the communication.
Question: In a science experiment, result X is expected to occur 25% of the time and result Y is expected to occur the remaining 75% of the time. The following code segment is intended to simulate the experiment if there are 100 trials.
Line 1: xCount 0
Line 2: yCount 0
Line 3: REPEAT 100 TIMES
Line 4: {
Line 5: IF(RANDOM(1, 4) = 1)
Line 6: {
Line 7: xCount xCount + 1
Line 8: }
Line 9: IF(RANDOM(1, 4) > 1)
Line 10: {
Line 11: yCount yCount + 1
Line 12: }
Line 13: }
Line 14: DISPLAY("Result X occurred")
Line 15: DISPLAY(xCount)
Line 16: DISPLAY("times and result Y occurred")
Line 17: DISPLAY(yCount)
Line 18: DISPLAY("times.")
A programmer runs the code segment, and the following message is displayed.
"Result X occurred 24 times and result Y occurred 70 times."
The result shows that 94 trials were counted, rather than the intended 100 trials. Which of the following changes to the code segment will ensure a correct simulation of the experiment?
Your selection: A
Correct Answer: C
Explanation: The incorrect trial count occurs because there are two calls to RANDOM for each iteration of the loop instead of one. Interchanging lines 5 and 9 will ensure that each trial is counted correctly.
Question: A city maintains a database of all traffic tickets that were issued over the past ten years. The tickets are divided into the following two categories: Moving violations and Nonmoving violations. The data recorded for each ticket include only the following information: The month and year in which the ticket was issued and the category of the ticket.
Which of the following questions CANNOT be answered using only the information in the database?
Responses:
A. Have the total number of traffic tickets per year increased each year over the past ten years?
B. In the past ten years, were nonmoving violations more likely to occur on a weekend than on a weekday?
C. In the past ten years, were there any months when moving violations occurred more often than nonmoving violations?
D. In how many of the past ten years were there more than one million moving violations?
Your selection: C
Correct Answer: B
Explanation: While question C can be answered by comparing the monthly counts of moving and nonmoving violations, question B requires additional information about the specific days of the week on which the violations occurred.
Question: Individuals sometimes attempt to remove personal information from the Internet. Which of the following is the LEAST likely reason the personal information is hard to remove?
Responses:
A. Internet users with a copy of the information might redistribute the personal information without first seeking permission.
B. There are potentially an extremely large number of devices on the Internet that may contain the information.
C. Automated technologies collect information about Internet users without their knowledge.
D. All personal information is stored online using authentication measures, making the information hard to access.
Your selection: C
Correct Answer: D
Explanation: While automated technologies do collect personal information online, the difficulty in removing personal information is primarily due to the widespread distribution of the information across devices (option B) and the potential for redistribution by internet users (option A). Option D, stating that all personal information is stored online using authentication measures, is less likely to be a significant factor in the difficulty of removing personal information.
Question: Which of the following best exemplifies the use of keylogging to gain unauthorized access to a computer system?
Responses:
A. A user unintentionally installs a program on their computer that records all user input and forwards it to another computer. A few weeks later, someone else is able to access the user’s computer using the recorded data.
B. A user has a very common password for an online banking account. Someone else guesses the password after a few attempts and gains access to the user’s account.
C. A user logs into an unsecure Web site. Someone else is able to view unencrypted log-in information as it is transmitted over the Internet. The user has the same username and password for multiple accounts, so the user’s log-in information for multiple systems may be compromised.
D. A user receives an e-mail that claims to be from the user’s bank. The e-mail instructs the user to click on a link to a Web site and enter a username and password to verify an account. Shortly after following the steps, the user discovers that the Web site is fraudulent and that the user’s username and password were stolen.
Your selection: C
Correct Answer: A
Explanation: Option A describes a scenario where a keylogger is installed on a user's computer, capturing all user input, and forwarding it to another computer, allowing unauthorized access to the user's system.
Question: The following spinner is used in a game. The region labeled "blue" represents 1/4 of the spinner. The regions labeled "orange" and "purple" are equal in size.
Which of the following code segments can be used to simulate the behavior of the spinner?
Select two answers.
Responses:
A.
The figure presents one block of code that consists of 7 lines. Throughout the code there are nested blocks of code, as follows.
[Begin Block] Line 1: IF [begin block] RANDOM [begin block] 1, 4 [end block] = 1 [end block]
[Begin Block] Line 2: [begin block] DISPLAY [begin block] “blue” [end block] [end block]
[End Block] Line 3: ELSE [Begin Block] [Begin Block] Line 4: IF [begin block] RANDOM [begin block] 1, 2 [end block] = 1 [end block]
[Begin Block] Line 5: [begin block] DISPLAY [begin block] “orange” [end block] [end block]
[End Block] Line 6: ELSE [Begin Block] Line 7: [begin block] DISPLAY [begin block] “purple” [end block] [end block]
[End Block] [End Block] [End Block] [End Block]
C.
The figure presents 2 blocks of code that consist of 8 lines. Throughout the code, there are nested blocks of code, as follows.
Line 1: [begin block] spin ← [begin block] RANDOM [begin block] 1, 4 [end block] [end block] [end block]
[Begin Block] Line 2: IF [begin block] spin = 1 [end block] [Begin Block] Line 3: [begin block] DISPLAY [begin block] “blue” [end block] [end block]
[End Block] Line 4: ELSE [Begin Block] [Begin Block] Line 5: IF [begin block] spin = 2 [end block] [Begin Block] Line 6: [begin block] DISPLAY [begin block] “orange” [end block] [end block]
[End Block] Line 7: ELSE [Begin Block] Line 8: [begin block] DISPLAY [begin block] “purple” [end block] [end block]
[End Block] [End Block] [End Block] [End Block]
Your selection: A, C
Correct Answer: A, C
Explanation: Option A correctly simulates the spinner's behavior by using nested IF statements to determine which region to display based on the outcome of random number generation. Option C also correctly simulates the spinner's behavior, but it assigns a random value to the variable "spin" before determining which region to display based on the value of "spin". Both options properly handle the probabilities associated with each region of the spinner.
Question: A list of numbers is considered increasing if each value after the first is greater than or equal to the preceding value. The following procedure is intended to return true if numberList is increasing and return false otherwise. Assume that numberList contains at least two elements.
Which of the following changes is needed for the program to work as intended?
Responses:
A. In line 3, 2 should be changed to 1.
B. In line 6, < should be changed to ≥.
C. Lines 8 and 12 should be interchanged.
D. Lines 10 and 11 should be interchanged.
Your selection: C
Correct Answer: C
Explanation: Option C correctly addresses the issue with the program's logic. By interchanging lines 8 and 12, the procedure will return true if it completes the loop without encountering a value less than the preceding value, indicating that the list is indeed increasing. If such a value is encountered during the loop, it will return false, indicating that the list is not increasing as intended.
Question: Consider the following code segment.
The figure presents 5 lines of code, as follows. Line 1: [begin block] first ← 100 [end block] Line 2: [begin block] second ← 200 [end block] Line 3: [begin block] temp ← first [end block] Line 4: [begin block] second ← temp [end block] Line 5: [begin block] first ← second [end block]
What are the values of first and second as a result of executing the code segment?
Responses: A. first = 100, second = 100 B. first = 100, second = 200 C. first = 200, second = 100 D. first = 200, second = 200
My Selection: B
Correct Answer: C
Explanation: The variable second, while initially assigned the value 200, is later assigned the value of temp, which is 100.
Question: Which of the following best explains how an analog audio signal is typically represented by a computer?
Responses: A. An analog audio signal is measured as input parameters to a program or procedure. The inputs are represented at the lowest level as a collection of variables. B. An analog audio signal is measured at regular intervals. Each measurement is stored as a sample, which is represented at the lowest level as a sequence of bits. C. An analog audio signal is measured as a sequence of operations that describe how the sound can be reproduced. The operations are represented at the lowest level as programming instructions. D. An analog audio signal is measured as text that describes the attributes of the sound. The text is represented at the lowest level as a string.
Your selection: A
Correct Answer: B
Explanation: Audio signals are typically digitized by sampling them at regular intervals. Each sample is then represented as a sequence of bits.
Question: Which of the following is NOT a benefit of collaborating to develop a computing innovation?
Responses: A. Collaboration can decrease the size and complexity of tasks required of individual team members. B. Collaboration can make it easier to find and correct errors during the development process. C. Collaboration eliminates the need to resolve differences of opinion. D. Collaboration facilitates multiple perspectives in developing ideas.
Your selection: A
Correct Answer: C
Explanation: Collaboration doesn't necessarily eliminate differences of opinion, but it can help manage and resolve them effectively through communication and teamwork.
Question: Consider the following procedure.
Procedure Call: drawLine(x1, y1, x2, y2) Explanation: Draws a line segment on a coordinate grid with endpoints at coordinates (x1, y1) and (x2, y2)
The drawLine procedure is to be used to draw the following figure on a coordinate grid:
[Description of the figure with 5 line segments and their coordinates]
Which of the following code segments can be used to draw the figure?
Your selection: C
Correct Answer: B
Explanation: This code segment correctly draws the figure by incrementing both x and y values to draw diagonal line segments.
Question: The figure below represents a network of physically linked devices labeled A through I. A line between two devices indicates that the devices can communicate directly with each other. Any information sent between two devices that are not directly connected must go through at least one other device.
How many connections need to be removed to prevent devices B and C from communicating directly?
Responses: A. Three B. Four C. Five D. Six
Your selection: A
Correct Answer: C
Explanation: Removing any three connections will not prevent devices B and C from communicating. For example, if connections A-C, C-D, and B-D are removed, then devices B and C can still communicate along the path B-E-F-C.
Question: Which of the following is a true statement about the use of public key encryption in transmitting messages?
Responses: A. Public key encryption enables parties to initiate secure communications through an open medium, such as the Internet, in which there might be eavesdroppers. B. Public key encryption is not considered a secure method of communication because a public key can be intercepted. C. Public key encryption only allows the encryption of documents containing text; documents containing audio and video must use a different encryption method. D. Public key encryption uses a single key that should be kept secure because it is used for both encryption and decryption.
Your selection: B
Correct Answer: A
Explanation: Public key encryption enables secure communications even through open mediums like the Internet, as it uses a pair of keys (public and private) for encryption and decryption, respectively. Even if the public key is intercepted, it doesn't compromise the security of the communication.
Question: In a science experiment, result X is expected to occur 25% of the time and result Y is expected to occur the remaining 75% of the time. The following code segment is intended to simulate the experiment if there are 100 trials.
Line 1: xCount 0 Line 2: yCount 0 Line 3: REPEAT 100 TIMES Line 4: { Line 5: IF(RANDOM(1, 4) = 1) Line 6: { Line 7: xCount xCount + 1 Line 8: } Line 9: IF(RANDOM(1, 4) > 1) Line 10: { Line 11: yCount yCount + 1 Line 12: } Line 13: } Line 14: DISPLAY("Result X occurred") Line 15: DISPLAY(xCount) Line 16: DISPLAY("times and result Y occurred") Line 17: DISPLAY(yCount) Line 18: DISPLAY("times.")
A programmer runs the code segment, and the following message is displayed.
"Result X occurred 24 times and result Y occurred 70 times."
The result shows that 94 trials were counted, rather than the intended 100 trials. Which of the following changes to the code segment will ensure a correct simulation of the experiment?
Your selection: A
Correct Answer: C
Explanation: The incorrect trial count occurs because there are two calls to RANDOM for each iteration of the loop instead of one. Interchanging lines 5 and 9 will ensure that each trial is counted correctly.
Question: A city maintains a database of all traffic tickets that were issued over the past ten years. The tickets are divided into the following two categories: Moving violations and Nonmoving violations. The data recorded for each ticket include only the following information: The month and year in which the ticket was issued and the category of the ticket.
Which of the following questions CANNOT be answered using only the information in the database?
Responses: A. Have the total number of traffic tickets per year increased each year over the past ten years? B. In the past ten years, were nonmoving violations more likely to occur on a weekend than on a weekday? C. In the past ten years, were there any months when moving violations occurred more often than nonmoving violations? D. In how many of the past ten years were there more than one million moving violations?
Your selection: C
Correct Answer: B
Explanation: While question C can be answered by comparing the monthly counts of moving and nonmoving violations, question B requires additional information about the specific days of the week on which the violations occurred.
Question: Individuals sometimes attempt to remove personal information from the Internet. Which of the following is the LEAST likely reason the personal information is hard to remove?
Responses: A. Internet users with a copy of the information might redistribute the personal information without first seeking permission. B. There are potentially an extremely large number of devices on the Internet that may contain the information. C. Automated technologies collect information about Internet users without their knowledge. D. All personal information is stored online using authentication measures, making the information hard to access.
Your selection: C
Correct Answer: D
Explanation: While automated technologies do collect personal information online, the difficulty in removing personal information is primarily due to the widespread distribution of the information across devices (option B) and the potential for redistribution by internet users (option A). Option D, stating that all personal information is stored online using authentication measures, is less likely to be a significant factor in the difficulty of removing personal information.
Question: Which of the following best exemplifies the use of keylogging to gain unauthorized access to a computer system?
Responses: A. A user unintentionally installs a program on their computer that records all user input and forwards it to another computer. A few weeks later, someone else is able to access the user’s computer using the recorded data. B. A user has a very common password for an online banking account. Someone else guesses the password after a few attempts and gains access to the user’s account. C. A user logs into an unsecure Web site. Someone else is able to view unencrypted log-in information as it is transmitted over the Internet. The user has the same username and password for multiple accounts, so the user’s log-in information for multiple systems may be compromised. D. A user receives an e-mail that claims to be from the user’s bank. The e-mail instructs the user to click on a link to a Web site and enter a username and password to verify an account. Shortly after following the steps, the user discovers that the Web site is fraudulent and that the user’s username and password were stolen.
Your selection: C
Correct Answer: A
Explanation: Option A describes a scenario where a keylogger is installed on a user's computer, capturing all user input, and forwarding it to another computer, allowing unauthorized access to the user's system.
Question: The following spinner is used in a game. The region labeled "blue" represents 1/4 of the spinner. The regions labeled "orange" and "purple" are equal in size.
Which of the following code segments can be used to simulate the behavior of the spinner?
Select two answers.
Responses: A.
The figure presents one block of code that consists of 7 lines. Throughout the code there are nested blocks of code, as follows. [Begin Block] Line 1: IF [begin block] RANDOM [begin block] 1, 4 [end block] = 1 [end block] [Begin Block] Line 2: [begin block] DISPLAY [begin block] “blue” [end block] [end block] [End Block] Line 3: ELSE [Begin Block] [Begin Block] Line 4: IF [begin block] RANDOM [begin block] 1, 2 [end block] = 1 [end block] [Begin Block] Line 5: [begin block] DISPLAY [begin block] “orange” [end block] [end block] [End Block] Line 6: ELSE [Begin Block] Line 7: [begin block] DISPLAY [begin block] “purple” [end block] [end block] [End Block] [End Block] [End Block] [End Block] C.
The figure presents 2 blocks of code that consist of 8 lines. Throughout the code, there are nested blocks of code, as follows. Line 1: [begin block] spin ← [begin block] RANDOM [begin block] 1, 4 [end block] [end block] [end block] [Begin Block] Line 2: IF [begin block] spin = 1 [end block] [Begin Block] Line 3: [begin block] DISPLAY [begin block] “blue” [end block] [end block] [End Block] Line 4: ELSE [Begin Block] [Begin Block] Line 5: IF [begin block] spin = 2 [end block] [Begin Block] Line 6: [begin block] DISPLAY [begin block] “orange” [end block] [end block] [End Block] Line 7: ELSE [Begin Block] Line 8: [begin block] DISPLAY [begin block] “purple” [end block] [end block] [End Block] [End Block] [End Block] [End Block]
Your selection: A, C
Correct Answer: A, C
Explanation: Option A correctly simulates the spinner's behavior by using nested IF statements to determine which region to display based on the outcome of random number generation. Option C also correctly simulates the spinner's behavior, but it assigns a random value to the variable "spin" before determining which region to display based on the value of "spin". Both options properly handle the probabilities associated with each region of the spinner.
Question: A list of numbers is considered increasing if each value after the first is greater than or equal to the preceding value. The following procedure is intended to return true if numberList is increasing and return false otherwise. Assume that numberList contains at least two elements.
Which of the following changes is needed for the program to work as intended?
Responses: A. In line 3, 2 should be changed to 1. B. In line 6, < should be changed to ≥. C. Lines 8 and 12 should be interchanged. D. Lines 10 and 11 should be interchanged.
Your selection: C
Correct Answer: C
Explanation: Option C correctly addresses the issue with the program's logic. By interchanging lines 8 and 12, the procedure will return true if it completes the loop without encountering a value less than the preceding value, indicating that the list is indeed increasing. If such a value is encountered during the loop, it will return false, indicating that the list is not increasing as intended.