WorksheetsCSP End-o-year Review
Total questions: 35
Worksheet time: 19mins
What is a key characteristic of Internet protocols?
Internet protocols are developed and overseen by a global committee of experts in the field
Internet protocols are constantly changing to prevent unauthorized access and cyberattacks
Internet protocols are customized by users to suit their specific browsing needs
Internet protocols are standardized and openly available for all devices to use
In order to send a photo over the Internet from one device to another, which of the following is NOT necessary?
Both devices using compatible communication protocols
A direct connection between the two devices
Routing the data through multiple connected devices
Both devices being physically connected to the Internet
This diagram shows a number of computing devices connected to the Internet with each line representing a direct connection. What is the MINIMUM number of paths that would need to be broken to prevent Computing Device A from connecting with Computing Device E?
1
2
3
4
Which of the following is NOT true of how packets are sent through the Internet?
Packet metadata is only included on important packets to indicate they should get access to faster paths through the network
Packet metadata is used to route and reassemble information traveling through the Internet
Packets that arrive out of order will be sent back to the server
Information sent through the internet is split into many packets, some contain the message and others contain the metadata
For the following four questions, match the appropriate definition to the term.
a group of connected computers that can send or receive data
Computing Newtork
a machine that can run a program
Computing Device
a sequence of direct connections
Path
a group of computers working together for a common purpose
Computing System
How has the Internet adapted to the increasing number of devices connected to the network?
Internet protocols are updated yearly to accommodate new devices
The network remains the same despite the growing number of devices
Internet protocols are structured in a way to handle additional devices
The need for Internet protocols has decreased with more devices connected
Among the following Internet protocols, which plays the MOST crucial role in reconstructing packets and requesting missing packets to assemble complete messages?
TCP (Transmission Control Protocol)
HTTP (Hypertext Transfer Protocol)
IP (Internet Protocol)
FTP (File Transfer Protocol)
Which of the following will result in ONLY all the items in list being printed to the console if placed where the program reads
i < list[list.length]
i < list.length
i < list[0]
i < list[1]
wordList is a list of words that currently contains the values ["laugh", "plan", "fun"]. Which of the following lines will result in the list containing the values ["fun", "plan", "fun"]?
wordList[0] = wordList[2]
wordList[2] = wordList[0]
insertItem(wordList, 0, "fun")
removeItem(wordList,0)
What will be displayed in the console when this program runs? var numList = [30,60,90]; console.log(numList[numList.length-1]);
2
60
89
90
What will be displayed when this program finishes running? var numbersList = [20, 10, 5] appendItem(numbersList, 50) removeItem(numbersList,1) insertItem(numbersList, 0, 30) console.log(numbersList.length)
3
6
7
4
What will the following program display in the console? var sum = 0; for(var i = 0; i < 6; i++){ sum = sum + i; } console.log(sum);
0
5
10
15
The following grid contains a robot represented as a triangle, which is initially facing toward the top of the grid. The robot can move into a white or gray square but cannot move into a black region. Which of the following code segments can be used to move the robot to the gray square?
REPEAT 8 TIMES { MOVE_FORWARD() }
A programmer has already written the following code with that information. Which of the following programs will result in filteredNames only containing the names of students who are 17 or younger?
for(var i = 0; i < ages.length; i++){ age = ages[i]; if(age < 17){ appendItem(filteredNames, age) } }
for(var i = 0; i < ages.length; i++){ age = ages[i]; if(age <= 17){ appendItem(filteredNames, names[i]) } }
for(var i = 0; i < ages.length; i++){ age = ages[i]; if(age >= 17){ appendItem(filteredNames, age) } }
for(var i = 0; i < ages.length; i++){ age = ages[i]; if(age >= 17){ appendItem(filteredNames, names[i]) } }
A job placement agency works to pair job seekers with potential employers. The agency aims to create a simulation to forecast probable job placement results for job seekers, drawing from past trends and patterns. Which of the following is most likely to be a benefit of the simulation?
The computer simulation could be used to test hypotheses about patterns in the job placement process that are expensive or time consuming to observe in reality.
The computer simulation will be able to include more details and complexity than the actual job placement process.
The computer simulation will provide accurate predictions for the actual outcomes for every job seeker.
The computer simulation will remove the bias that may arise in the real-world job placement process.
A program is designed to determine the minimum value in a list of positive numbers called numList. The following program was written:
var minimum = <INSERT CODE HERE>
for(var i = 0; i < numList.length; i++){
if (numList[i] < minimum){
minimum = numList[i]; } }
console.log(“The minimum is” + minimum);
Which of the following can be used to replace <INSERT CODE HERE> so that the program works as intended for every possible list of positive numbers?
1
1000
numList[0]
numList.length
A 2-sided coin has an equal likelihood of landing on each side. One side is called "heads" and the other is called "tails". The program below simulates randomly flipping that coin many times. var heads = 0; var tails = 0; var rolls = 50; for(var i = 0; i < rolls; i++){ if(randomNumber(0,1) == 0){ heads++ } else { tails++ } } Which of the following is NOT a possible combination of values of the variables in this program when it finishes running?
tails has a value of 0 and heads has a value of 50
tails has a value of 50 and heads has a value of 0
tails has a value of 50 and heads has a value of 50
tails has a value of 25 and heads has a value of 25
Dividing a program into separate subprograms (such as libraries) is known as:
API
Documentation
Iteration
Modularity
Which line of code should the return statement be placed after?
After line 2
After line 4
After line 6
After line 7
Which of these return statements is the best for this procedure, calcDistance?
RETURN distance
RETURN SQRT (sum)
RETURN d
RETURN sum
What is printed to the console? console.log (15 % 4) ;
1
2
3
4
Which term refers to a solution to a large problem that is based on the solutions of smaller subproblems.
API
Library
Parameter
Procedural Abstraction
What method could a student use to calculate the average of 10,000 numbers from a data file in their program efficiently?
A procedure that returns the quotient when dividing one value by another
A procedure that returns the sum of the values in the file
A procedure that returns the sum when adding one value to another
A procedure that returns true if the file contains any duplicate values and returns false otherwise
Using existing algorithms as building blocks for new algorithms has all the following benefits EXCEPT:
simplifies debugging
removes procedural abstraction
reduces testing
reduces development time
What type of step is represented by a diamond in the flowcharts?
The start of the algorithm
An input or output step
A conditional or decision step
The result of the algorithm
Iteration
Directions given with a clear order of steps
Functions
If statements
Loops
Procedure
Directions given with a clear order of steps
Functions
If statements
Loops
Selection
Directions given with a clear order of steps
Functions
If statements
Loops
Sequence
Directions given with a clear order of steps
Functions
If statements
Loops
All parts below were required for the Create Performance Task EXCEPT which one?
Project Code PDF
Bibliography of sources used
Personalized Project Reference without comments
Video showing functionality, input, & output
Which of the following are benefits of parallel and distributed computing? I. Distributed computing improves the speed at which an individual computer executes a program II. Parallel computing scales more effectively than sequential computing III. Distributed computing allows larger problems to be solved quicker
I only
I and II
II and III
I, II, and III
A group of students writes their names and unique student ID numbers on sheets of paper. The sheets are then randomly placed in a stack. Their teacher is looking to see if a specific ID number is included in the stack. Which of the following best describes whether their teacher should use a linear or a binary search?
The teacher could use either type of search though the linear search is likely to be faster
The teacher could use either type of search though the binary search is likely to be faster
Neither type of search will work since the data is numeric
Only the linear search will work since the data has not been sorted
A school is creating class schedules for its students. The students submit their requested courses and then a program will be designed to find the optimal schedule for all students. The school has determined that finding the absolute best schedule cannot be solved in a reasonable time. Instead they have decided to use a simpler algorithm that produces a good but non-optimal schedule in a more reasonable amount of time. Which principle does this decision best demonstrate?
Unreasonable algorithms may sometimes also be undecidable
Two algorithms that solve the same problem must also have the same efficiency
Heuristics can be used to solve some problems for which no reasonable algorithm exists
Approximate solutions are often identical to optimal solutions
This graph shows the efficiencies of two different algorithms that solve the same problem. Which of the following is most efficient?
These algorithms are equally efficient
Algorithm A is more efficient than algorithm B
Algorithm B is more efficient than algorithm A
The algorithms have different efficiencies depending on the input size
Which of the following best describes the existence of undecidable problems?
Undecidable problems are problems for which more than one algorithm solves the problem and computer scientists have not yet chosen the algorithm they believe is best
Undecidable problems are problems for which an algorithm can be written that will produce the same output for at least two possible inputs
An undecidable problem is a problem for which no algorithm can be constructed that always produces a correct output
Undecidable problems are problems for which an algorithm can be written that produces a correct output for all inputs but in an unreasonable time
