wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

7th - Unit 4 Lesson 2 Test

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

What are the three main parts of an algorithm?

a)

Input, Output, and Storage

b)

Sequencing, Selection, and Iteration

c)

Numbers, Text, and Images

d)

Variables, Lists, and Arrays

2.

What does 'sequencing' mean in an algorithm?

a)

Repeating a step over and over

b)

Asking a question to make a decision

c)

The specific order of steps needed to reach a goal

d)

Fixing mistakes in the code

3.

If you want a computer to do a math problem, which part of the algorithm comes first?

a)

Display the answer to the user

b)

Define the variables

c)

Perform the math function

d)

Assign the answer to a variable

4.

Which part of an algorithm uses 'if' statements to ask questions and make decisions?

a)

Selection

b)

Sequencing

c)

Iteration

d)

Translation

5.

What is the main purpose of 'iteration' in coding?

a)

To define a variable name

b)

To repeat steps until a specific condition is met

c)

To stop the code immediately

d)

To list steps in a specific order

6.

Which of the following is an example of iteration?

a)

Defining a number as 5

b)

A business sending a thank you email to a single person

c)

Doing the same task over and over

d)

Checking if a customer spent $500

7.

What is a 'variable' in coding?

a)

A set of data used to store specific information

b)

A repeated action

c)

A type of computer error

d)

The speed of the internet

8.

Which type of variable would you use to store a person's email address?

a)

Boolean

b)

Integer

c)

Text

d)

Array

9.

What is a 'Boolean' variable most like?

a)

A calculator

b)

A light switch (On/Off)

c)

A dictionary

d)

A grocery list

10.

If you need to store a player’s score or age, which variable type should you use?

a)

Text

b)

Boolean

c)

Integer

d)

String

11.

What do 'operators' do in an algorithm?

a)

They delete old files

b)

They allow variables to interact (like adding or comparing them)

c)

They turn the computer on and off

d)

They create pictures for the user

12.

Which symbol is used to assign data to a variable?

a)

+

b)

==

c)

=

d)

>

13.

Which operator would you use to check if two variables are exactly the same?

a)

Greater than (>)

b)

Less than (<)

c)

Not equal to (!=)

d)

Equal to (==)

14.

What happens if you use the code variable++?

a)

It subtracts 1 from the variable

b)

It adds 1 to the variable

c)

It deletes the variable

d)

It multiplies the variable by 2

15.

What is the smallest measurement of machine data?

a)

A byte

b)

A bit

c)

An integer

d)

A list

16.

How many bits make up one byte?

a)

2

b)

4

c)

8

d)

10

17.

How is the letter 'A' stored in a computer?

a)

As a picture of the letter A

b)

As a sound file

c)

As a binary number made of 0s and 1s

d)

As a text variable only

18.

What is the difference between a variable and a list (array)?

a)

A variable holds numbers, but a list only holds text

b)

A variable holds one piece of data, but a list can store many pieces of data

c)

A list is smaller than a variable

d)

Variables are not used in algorithms

19.

If you wanted to store a list of product prices for a store, what would be the best tool?

a)

A Boolean

b)

A single Integer

c)

An Array (List)

d)

A Text string

20.

In the text, sending a newsletter only to customers who spent over $500 is an example of what?

a)

Sequencing

b)

Selection

c)

Iteration

d)

Machine Data