wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CSP End-o-year Review

Total questions: 35

Worksheet time: 19mins

Name
Class
Date
1.

What is a key characteristic of Internet protocols?

a)

Internet protocols are developed and overseen by a global committee of experts in the field

b)

Internet protocols are constantly changing to prevent unauthorized access and cyberattacks

c)

Internet protocols are customized by users to suit their specific browsing needs

d)

Internet protocols are standardized and openly available for all devices to use

2.

In order to send a photo over the Internet from one device to another, which of the following is NOT necessary?

a)

Both devices using compatible communication protocols

b)

A direct connection between the two devices

c)

Routing the data through multiple connected devices

d)

Both devices being physically connected to the Internet

3.

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?

a)

1

b)

2

c)

3

d)

4

4.

Which of the following is NOT true of how packets are sent through the Internet?

a)

Packet metadata is only included on important packets to indicate they should get access to faster paths through the network

b)

Packet metadata is used to route and reassemble information traveling through the Internet

c)

Packets that arrive out of order will be sent back to the server

d)

Information sent through the internet is split into many packets, some contain the message and others contain the metadata

5.

For the following four questions, match the appropriate definition to the term.

a)

a group of connected computers that can send or receive data

1.

Computing Newtork

b)

a machine that can run a program

2.

Computing Device

c)

a sequence of direct connections

3.

Path

d)

a group of computers working together for a common purpose

4.

Computing System

6.

How has the Internet adapted to the increasing number of devices connected to the network?

a)

Internet protocols are updated yearly to accommodate new devices

b)

The network remains the same despite the growing number of devices

c)

Internet protocols are structured in a way to handle additional devices

d)

The need for Internet protocols has decreased with more devices connected

7.

Among the following Internet protocols, which plays the MOST crucial role in reconstructing packets and requesting missing packets to assemble complete messages?

a)

TCP (Transmission Control Protocol)

b)

HTTP (Hypertext Transfer Protocol)

c)

IP (Internet Protocol)

d)

FTP (File Transfer Protocol)

8.

Which of the following will result in ONLY all the items in list being printed to the console if placed where the program reads and the program is run?

a)

i < list[list.length]

b)

i < list.length

c)

i < list[0]

d)

i < list[1]

9.

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"]?

a)

wordList[0] = wordList[2]

b)

wordList[2] = wordList[0]

c)

insertItem(wordList, 0, "fun")

d)

removeItem(wordList,0)

10.

What will be displayed in the console when this program runs? var numList = [30,60,90]; console.log(numList[numList.length-1]);

a)

2

b)

60

c)

89

d)

90

11.

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)

a)

3

b)

6

c)

7

d)

4

12.

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);

a)

0

b)

5

c)

10

d)

15

13.

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?

a)

b)

REPEAT 8 TIMES { MOVE_FORWARD() }

c)

14.

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?

a)

for(var i = 0; i < ages.length; i++){ age = ages[i]; if(age < 17){ appendItem(filteredNames, age) } }

b)

for(var i = 0; i < ages.length; i++){ age = ages[i]; if(age <= 17){ appendItem(filteredNames, names[i]) } }

c)

for(var i = 0; i < ages.length; i++){ age = ages[i]; if(age >= 17){ appendItem(filteredNames, age) } }

d)

for(var i = 0; i < ages.length; i++){ age = ages[i]; if(age >= 17){ appendItem(filteredNames, names[i]) } }

15.

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?

a)

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.

b)

The computer simulation will be able to include more details and complexity than the actual job placement process.

c)

The computer simulation will provide accurate predictions for the actual outcomes for every job seeker.

d)

The computer simulation will remove the bias that may arise in the real-world job placement process.

16.

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?

a)

1

b)

1000

c)

numList[0]

d)

numList.length

17.

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?

a)

tails has a value of 0 and heads has a value of 50

b)

tails has a value of 50 and heads has a value of 0

c)

tails has a value of 50 and heads has a value of 50

d)

tails has a value of 25 and heads has a value of 25

18.

Dividing a program into separate subprograms (such as libraries) is known as:

a)

API

b)

Documentation

c)

Iteration

d)

Modularity

19.

Which line of code should the return statement be placed after?

a)

After line 2

b)

After line 4

c)

After line 6

d)

After line 7

20.

Which of these return statements is the best for this procedure, calcDistance?

a)

RETURN distance

b)

RETURN SQRT (sum)

c)

RETURN d

d)

RETURN sum

21.

What is printed to the console? console.log (15 % 4) ;

a)

1

b)

2

c)

3

d)

4

22.

Which term refers to a solution to a large problem that is based on the solutions of smaller subproblems.

a)

API

b)

Library

c)

Parameter

d)

Procedural Abstraction

23.

What method could a student use to calculate the average of 10,000 numbers from a data file in their program efficiently?

a)

A procedure that returns the quotient when dividing one value by another

b)

A procedure that returns the sum of the values in the file

c)

A procedure that returns the sum when adding one value to another

d)

A procedure that returns true if the file contains any duplicate values and returns false otherwise

24.

Using existing algorithms as building blocks for new algorithms has all the following benefits EXCEPT:

a)

simplifies debugging

b)

removes procedural abstraction

c)

reduces testing

d)

reduces development time

25.

What type of step is represented by a diamond in the flowcharts?

a)

The start of the algorithm

b)

An input or output step

c)

A conditional or decision step

d)

The result of the algorithm

26.

Iteration

a)

Directions given with a clear order of steps

b)

Functions

c)

If statements

d)

Loops

27.

Procedure

a)

Directions given with a clear order of steps

b)

Functions

c)

If statements

d)

Loops

28.

Selection

a)

Directions given with a clear order of steps

b)

Functions

c)

If statements

d)

Loops

29.

Sequence

a)

Directions given with a clear order of steps

b)

Functions

c)

If statements

d)

Loops

30.

All parts below were required for the Create Performance Task EXCEPT which one?

a)

Project Code PDF

b)

Bibliography of sources used

c)

Personalized Project Reference without comments

d)

Video showing functionality, input, & output

31.

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

a)

I only

b)

I and II

c)

II and III

d)

I, II, and III

32.

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?

a)

The teacher could use either type of search though the linear search is likely to be faster

b)

The teacher could use either type of search though the binary search is likely to be faster

c)

Neither type of search will work since the data is numeric

d)

Only the linear search will work since the data has not been sorted

33.

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?

a)

Unreasonable algorithms may sometimes also be undecidable

b)

Two algorithms that solve the same problem must also have the same efficiency

c)

Heuristics can be used to solve some problems for which no reasonable algorithm exists

d)

Approximate solutions are often identical to optimal solutions

34.

This graph shows the efficiencies of two different algorithms that solve the same problem. Which of the following is most efficient?

a)

These algorithms are equally efficient

b)

Algorithm A is more efficient than algorithm B

c)

Algorithm B is more efficient than algorithm A

d)

The algorithms have different efficiencies depending on the input size

35.

Which of the following best describes the existence of undecidable problems?

a)

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

b)

Undecidable problems are problems for which an algorithm can be written that will produce the same output for at least two possible inputs

c)

An undecidable problem is a problem for which no algorithm can be constructed that always produces a correct output

d)

Undecidable problems are problems for which an algorithm can be written that produces a correct output for all inputs but in an unreasonable time