wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

AP CSP Unit 2 Quiz 1 Review

Total questions: 17

Worksheet time: 10mins

Name
Class
Date
1.

What are the two main ways that algorithms can be designed?

a)

Images or videos

b)

In pseudocode or as a flowchart

c)

By hardware or software

2.

What is pseudocode?

a)

A way of describing a set of instructions in text form

b)

A specific programming language that all computers use

c)

A diagrammatic representation of a set of instructions

3.

What is a flowchart?

a)

A flowchart is a text-based way of designing an algorithm

b)

A flowchart is a specific programming language

c)

A flowchart is a diagram that represents a set of instructions

4.

How are symbols connected together in a flowchart?

a)

Symbols do not get connected together in a flowchart

b)

With lines and an arrow to show the direction of flow

c)

By numbers

5.
a)

makes a and b equal to each other

b)

this code doesn't do anything

c)

rearranges the variables a, b, and tmp.

d)

swaps the values of a and b

e)

This program causes an error

6.
a)

x is equal to 15; y is equal to 15

b)

x is equal to 5; y is equal to 10

c)

x is equal to 15; y is equal to 10

d)

x is equal to "x + 5"; y is equal to "x"

e)

x is equal to 10, 15; y is equal to 5, 10

7.

What is sequencing?

a)

The characters you code in Scratch

b)

A set of instructions carried out in a logical order to complete a task

c)

A loop that makes code go round and round

d)

A variety of coloured blocks that provide coding in Scratch

8.

Selection is...

a)

a list of instructions which are followed in a set order

b)

a list of instructions where there is a choice based on a condition

c)

A list of instructions which will loop based on a condition

d)

A list of instructions which will loop forever

9.

IF is...

a)

sequencing

b)

iterating

c)

selecting

10.

What is an algorithm?

a)

A set of instructions which describe a system

b)

The solution to a problem

c)

A type of programming

11.

Which of the following contains an INCORRECT sequence when getting dressed to go out?

a)

Put on socks, put on shoes, put on coat

b)

Put on coat, put on shoes, put on socks

c)

Put on socks, put on coat, put on shoes

12.

Why is selection important?

a)

Selection allows us to include more than one path through a solution

b)

Selection allows us to repeat steps in a solution

c)

Selection allows us make our solution more efficient

13.

myAge = 12

PRINT "Next year I will be: "

PRINT myAge + 1

PRINT "In two years I will be: "

PRINT myAge + 2

PRINT "In three years I will be: "

PRINT myAge + 3

a)

Iteration

b)

Sequencing

c)

Selection

14.

IF LENGTH( password ) < 8:

PRINT ("Your password is not valid!")

a)

Iteration

b)

Sequencing

c)

Selection

15.

IF (score > 90) AND (score <= 100):

PRINT "You grade is A*"

a)

Iteration

b)

Sequencing

c)

Selection

16.

IF goalsIn == goalsOut:

PRINT "It's a draw"

ELSE IF goalsIn > goalsOut:

PRINT "Player 1 wins!"

ELSE:

PRINT "Player 2 wins!"

a)

Iteration

b)

Sequencing

c)

Selection

17.

Here's an algorithm that sums all of the numbers in a list. Which of the following IS used in this algorithm?

a)

Sequencing

b)

Selection

c)

Iteration

d)

This algorithm uses sequencing, selection, and iteration.