Docsity

APCSP PRACTICE TEST CORE COMPUTER SCIENCE PRINCIPLES REVIEW, Exams of Information and Communications Technology (ICT)

Toggle sidebar
bg1
APCSP PRACTICE TEST CORE COMPUTER SCIENCE
PRINCIPLES REVIEW
Question 1.
What is the purpose of relational operators?
Answer: They test the relationship between two variables, expressions, or
values.
Question 2.
What do relational operators evaluate to?
Answer: A Boolean value.
Question 3.
What does the expression 'a = b' evaluate to?
Answer: True if a and b are equal; otherwise false.
Question 4.
What does the NOT operator do?
Answer: Evaluates to true if the condition is false; otherwise false.
Question 5.
When does 'condition1 AND condition2' evaluate to true?
Answer: If both condition1 and condition2 are true.
Question 6.
When does 'condition1 OR condition2' evaluate to true?
Answer: If either condition1 or condition2 is true, or both are true.
Question 7.
What happens if a Boolean expression evaluates to true in an IF statement?
Answer: The code in the block of statements is executed.
Question 8.
What is the function of the ELSE statement in an IF-ELSE structure?
Answer: It executes the second block of statements if the condition is false.
Question 9.
What does the REPEAT UNTIL statement do?
Answer: Repeats the block of statements until the Boolean expression
evaluates to true.
Question 10.
What is the result of accessing aList[i]?
Answer: It accesses the element of aList at index i.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download APCSP PRACTICE TEST CORE COMPUTER SCIENCE PRINCIPLES REVIEW and more Exams Information and Communications Technology (ICT) in PDF only on Docsity!

APCSP PRACTICE TEST CORE COMPUTER SCIENCE

PRINCIPLES REVIEW

Question 1.

What is the purpose of relational operators?

Answer: They test the relationship between two variables, expressions, or values.

Question 2.

What do relational operators evaluate to?

Answer: A Boolean value.

Question 3.

What does the expression 'a = b' evaluate to?

Answer: True if a and b are equal; otherwise false.

Question 4.

What does the NOT operator do?

Answer: Evaluates to true if the condition is false; otherwise false.

Question 5.

When does 'condition1 AND condition2' evaluate to true?

Answer: If both condition1 and condition2 are true.

Question 6.

When does 'condition1 OR condition2' evaluate to true?

Answer: If either condition1 or condition2 is true, or both are true.

Question 7.

What happens if a Boolean expression evaluates to true in an IF statement?

Answer: The code in the block of statements is executed.

Question 8.

What is the function of the ELSE statement in an IF-ELSE structure?

Answer: It executes the second block of statements if the condition is false.

Question 9.

What does the REPEAT UNTIL statement do?

Answer: Repeats the block of statements until the Boolean expression evaluates to true.

Question 10.

What is the result of accessing aList[i]?

Answer: It accesses the element of aList at index i.

Question 11.

What does the INSERT function do?

Answer: Shifts values in aList to the right and places value at index i.

Question 12.

What does the APPEND function do?

Answer: Increases the length of aList by 1 and places value at the end.

Question 13.

What happens when REMOVE is called on aList?

Answer: Removes the item at index i and shifts values left.

Question 14.

What does LENGTH(aList) return?

Answer: The number of elements in aList.

Question 15.

What does the FOR EACH loop do?

Answer: Assigns the value of each element of aList to the variable item sequentially.

Question 16.

What is a procedure in programming?

Answer: Defines a block of statements that can take arguments and be called.

Question 17.

What does the RETURN statement do in a procedure?

Answer: Returns the flow of control to the calling statement and returns a value.

Question 18.

What does the robot do in the context provided?

Answer: Moves one square forward in the direction it is facing.

Question 19.

What is the syntax for defining a procedure?

Answer: PROCEDURE procName(parameter1, parameter2, ...) { }.

Question 20.

How can a procedure be called?

Answer: Using the notation procName(arg1, arg2, ...).

What is the eligibility criteria for a ride at an amusement park?

Answer: Must be at least 12 years old and between 50 and 80 inches tall.

Question 32.

What expression evaluates to true for ride eligibility?

Answer: (age >= 12) AND (height >= 50 AND height <= 80)

Question 33.

What are the final values of first and second after executing the code segment?

Answer: first = 200, second = 100

Question 34.

What best explains the relationship between the Internet and the World Wide Web?

Answer: The Internet is a network of interconnected networks, and the World Wide Web is a system of linked pages accessed via the Internet.

Question 35.

Which code segment displays the output 'up down down down up down down down'?

Answer: REPEAT 2 TIMES DISPLAY 'up' REPEAT 3 TIMES DISPLAY 'down'

Question 36.

What exemplifies multifactor authentication in online banking?

Answer: After entering a password, a user must also enter a code sent to their phone.

Question 37.

What is the initial action in the game played on the board?

Answer: Place a game piece on a space that is not red and set a counter to 0.

Question 38.

What happens if the game piece is on a yellow space?

Answer: Move the game piece 3 positions to the left.

Question 39.

What is the value of the counter if the game piece starts on the rightmost black space?

Answer: The counter will be 3 at the end of the game.

Question 40.

What is a direct benefit of using redundant routing on the Internet?

Answer: Redundancy allows messages to be sent even if some devices or connections fail.

Question 41.

How is an analog audio signal typically represented by a computer?

Answer: An analog audio signal is measured at regular intervals, with each measurement stored as a sample represented as a sequence of bits.

Question 42.

What is the decimal value for the jump control?

Answer: 24

Question 43.

What control is represented by the decimal value 15?

Answer: ↓

Question 44.

What can the robot move into?

Answer: The robot can move into a white or gray square.

Question 45.

What does the procedure goalReached evaluate to?

Answer: True if the robot is in the gray square, false otherwise.

Question 46.

Which is NOT a benefit of collaborating to develop a computing innovation?

Answer: Collaboration eliminates the need to resolve differences of opinion.

Question 47.

What change is needed for the program to check if a list of numbers is increasing?

Answer: In line 3, 2 should be changed to 1.

Question 48.

What does the drawLine procedure do?

Answer: Draws a line segment on a coordinate grid with specified endpoints.

Question 49.

Which code segment can be used to draw the figure with 5 line segments?

Answer: xVal ←1; yVal ←0; len ←1; REPEAT 5 TIMES { drawLine(xVal, yVal, xVal, yVal + len); xVal ← xVal + 1; len ←len + 1; }

Question 50.

What are the consequences of publishing an e-book with a no- rights-reserved Creative Commons license?

Answer: Individuals can freely distribute or use the contents without needing additional permissions from the author.

Question 51.

What is the minimum number of connections that must be broken for device B to no longer communicate with device C?

Question 61.

Which strategy is least likely to introduce bias in a social media application?

Answer: Inviting a random sample of all users to try out the new algorithm and provide feedback before it is released to a wider audience.

Question 62.

What does an oval represent in a flowchart?

Answer: The start or end of the algorithm.

Question 63.

What does a rectangle represent in a flowchart?

Answer: One or more processing steps, such as a statement that assigns a value to a variable.

Question 64.

What does a diamond represent in a flowchart?

Answer: A conditional or decision step.

Question 65.

What does a parallelogram represent in a flowchart?

Answer: Displays a message.

Question 66.

What initial values of j and k will cause an infinite loop in the algorithm?

Answer: j = 0, k = 5

Question 67.

What value is displayed if j is 3 and k is 4?

Answer: 9

Question 68.

How is data transmitted on the Internet?

Answer: Data is broken into packets, which can be sent along different paths.

Question 69.

What is the relationship between a binary number and its transformed version after appending three 0s?

Answer: The transformed number is 8 times the value of the original number.

Question 70.

What does public key encryption enable?

Answer: It enables secure communications through an open medium.

Question 71.

How does Algorithm II categorize in route delivery?

Answer: It uses a heuristic approach to provide an approximate solution in reasonable time.

Question 72.

What change ensures a correct simulation of the experiment in the code segment?

Answer: Replacing line 9 with ELSE

Question 73.

In how many of the past ten years were there more than one million moving violations?

Answer: What question cannot be answered with the traffic ticket database?

Question 74.

What is the least likely reason personal information is hard to remove from the Internet?

Answer: All personal information is stored online using authentication measures.

Question 75.

Which value is NOT displayed by the program in the nested code?

Answer: carrot

Question 76.

In what situation is using a simulation least suitable for solving a problem?

Answer: When the problem requires precise measurements and real-world data.

Question 77.

What is the minimum number of bits required for each binary sequence if a store has between 75 and 100 items?

Answer: 7

Question 78.

Which activity has the greatest potential to contribute to the digital divide?

Answer: Requiring applicants for government jobs to apply using an online platform

Question 79.

What solution uses crowdsourcing to encourage respectful communication in online games?

Answer: The company allows individual players to endorse fellow players based on courteous interactions.

Answer: 2

Question 91.

How many squares does the robot move to the right after moving upwards?

Answer: 4

Question 92.

How many squares does the robot move upwards before ending?

Answer: 3

Question 93.

What is the result of the code segment that includes a procedure named botStepper?

Answer: It moves the robot according to specified steps.

Question 94.

What is the total number of items in the inventory if the store has between 75 and 100 items?

Answer: Between 75 and 100.

Question 95.

What is the purpose of the procedure 'botStepper'?

Answer: To move the robot forward a specified number of times.

Question 96.

What is the average customer rating for Delicious Sub Shop II?

Answer: 4.

Question 97.

How many customer ratings does Rustic Farm Tavern have?

Answer: 116

Question 98.

What is the price range for 78th Street Bistro?

Answer: med

Question 99.

What is the customer rating for Seaside Taqueria?

Answer: 4.

Question 100.

What is the price range for Delicious Sub Shop II?

Answer: lo

Question 101.

What is the price range for Rustic Farm Tavern?

Answer: hi

Question 102.

Does Seaside Taqueria accept credit cards?

Answer: Yes

Question 103.

What is the price range for ABC Downtown Diner?

Answer: med

Question 104.

What is the average customer rating for Joey Calzone's Pizzeria?

Answer: 3.

Question 105.

How many customer ratings does Seaside Taqueria have?

Answer: 214

Question 106.

Does Rustic Farm Tavern accept credit cards?

Answer: Yes

Question 107.

What does 'lo' indicate in the price range?

Answer: Under $

Question 108.

What does 'med' indicate in the price range?

Answer: $11 to $

Question 109.

What does 'hi' indicate in the price range?

Answer: Over $

Question 110.

What is the first step to identify restaurants that accept credit cards with the greatest average rating?

Answer: Filter by number of ratings

Question 111.

What is the second step after filtering by number of ratings?

Answer: Filter by payment type

Question 121.

What is the intended transformation of the list utensils?

Answer: Move the last element to the beginning.

Question 122.

Which code segment correctly transforms the list utensils?

Answer: Option (C): temp ← utensils[len]; REMOVE(utensils, len); INSERT(utensils, 1, temp)

Question 123.

What information does Spreadsheet I contain?

Answer: Student name, student ID, and grade point average.

Question 124.

What does Spreadsheet II contain?

Answer: Information on students who play at least one sport, including student ID and sports names.

Question 125.

What does Spreadsheet III include?

Answer: Information on students with a GPA greater than 3.5, including student name and ID.

Question 126.

What does Spreadsheet IV contain?

Answer: Information on students who play more than one sport, including student name and ID.

Question 127.

Which spreadsheets can be combined to analyze GPA of athletes?

Answer: Option (C): Spreadsheets II and III.

Question 128.

What is the execution time of process P?

Answer: 30 seconds.

Question 129.

What is the execution time of process Q?

Answer: 10 seconds.

Question 130.

What is the execution time of process R?

Answer: 20 seconds.

Question 131.

What is the execution time of process S?

Answer: 15 seconds.

Question 132.

Which parallel computing solution minimizes execution time?

Answer: Option (B): Running processes P and R on one processor and Q and S on the other.

Question 133.

What data must be collected for RunRoutr to suggest a running route?

Answer: The user's geographic position.

Question 134.

What data is necessary to share Adrianna's running route?

Answer: The current locations of other RunRoutr users.

Question 135.

What is a likely benefit of the RunRoutr application?

Answer: Users may see health benefits from exercising together.

Question 136.

What is a data privacy concern for RunRoutr users?

Answer: Users may determine information about locations of users not on their contact lists.

Question 137.

Which group is least likely to receive targeted advertisements?

Answer: Individuals who sign up for a premium account.

Question 138.

What are the equivalent expressions for the value of expression based on the table?

Answer: Options (A) and (D): (NOT input1) OR (NOT input2) and NOT (input AND input2).

Question 139.

What age group is considered a minor?

Answer: People who are under 18.

Question 140.

What age group is considered a senior citizen?

Answer: People who are 65 and older.

Question 141.

Question 152.

For which contents of myList will the duplicate removal procedure NOT work as intended?

Answer: A) [10, 10, 20, 20, 10, 10], D) [50, 50, 50, 50, 50, 50]

Question 153.

What type of data does each photo file contain for a science project about weather patterns?

Answer: Data representing the level of red, green, and blue for each pixel, along with metadata.

Question 154.

When is analyzing metadata more appropriate than analyzing pixel data?

Answer: A) Determining the chronological order of the photos, D) Determining whether two photos were taken at the same location on different days.

Question 155.

What does the substring procedure do?

Answer: Returns a substring of consecutive characters of str from start to end.

Question 156.

What does the concat procedure do?

Answer: Returns a single string consisting of str1 followed by str2.

Question 157.

What does the len procedure return?

Answer: The number of characters in a string.

Question 158.

How can a programmer create a new string by removing a character at position n from oldStr?

Answer: By using substring and concat procedures.

Question 159.

What is the correct way to create newStr by removing the character at position n?

Answer: A) left ← substring(oldStr, 1, n - 1); right ← substring(oldStr, n + 1, len(oldStr)); newStr ← concat(left, right).

Question 160.

What is phishing?

Answer: A technique that attempts to trick a user into providing personal information.

Question 161.

What must be true for a person to be eligible for a ride based on age and height?

Answer: Age must be ≥ 12 and height must be ≥ 50 and ≤ 80.

Question 162.

What is the difference between the Internet and the World Wide Web?

Answer: The Internet is a network of interconnected networks; the World Wide Web is an information system accessed via the Internet.

Question 163.

What is the initial value of the variable first in the code segment?

Answer: 100

Question 164.

What is the initial value of the variable second in the code segment?

Answer: 200

Question 165.

What happens to the variable first after executing the code segment?

Answer: Both first and second have the value 100.

◉