wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Understanding Basic Programming Concepts

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

What is an algorithm?

a)

A type of computer

b)

A step by step set of instructions to solve a problem

c)

A programming language

d)

A maths equation

2.

Which of the following is an example of an algorithm in everyday life?

a)

Watching television

b)

Brushing your teeth following a set of steps

c)

Listening to music

d)

Drawing a picture

3.

In programming, what is a 'variable'?

a)

A type of food

b)

A place to store information

c)

A musical instrument

d)

A kind of animal

4.

Which of the following is NOT a basic programming concept?

a)

Loops

b)

Variables

c)

Recipes

d)

Algorithms

5.

What does a 'loop' do in a program?

a)

Stops the program

b)

Repeats a set of instructions

c)

Changes the colour of the screen

d)

Draws a picture

6.

If you want to tell a computer to do something only if a condition is true, which programming concept do you use?

a)

Loop

b)

Variable

c)

If statement

d)

Algorithm

7.

Which of the following is the correct order for writing an algorithm to make a cup of tea?

a)

Pour water, add tea bag, boil water, drink tea

b)

Boil water, add tea bag, pour water, drink tea

c)

Drink tea, add tea bag, boil water, pour water

d)

Add tea bag, drink tea, pour water, boil water

8.

What is the main purpose of using step by step instructions in programming?

a)

To confuse the computer

b)

To make sure the computer knows exactly what to do

c)

To make the program look longer

d)

To use more electricity

9.

Which of the following is a correct example of a variable name?

a)

2apples

b)

apples2

c)

apples-2

d)

apples 2

10.

What does the following algorithm do? 1. Start 2. Get two numbers 3. Add the numbers 4. Show the answer 5. Stop

a)

Multiplies two numbers

b)

Adds two numbers

c)

Subtracts two numbers

d)

Divides two numbers

11.

Which of the following is NOT a step in creating an algorithm?

a)

Identifying the problem

b)

Writing random instructions

c)

Listing the steps in order

d)

Testing the solution

12.

If you want to repeat an action 5 times, which programming concept would you use?

a)

Variable

b)

Loop

c)

If statement

d)

Algorithm

13.

What is the output of this algorithm? 1. Start 2. Set number = 10 3. Add 5 to number 4. Show number 5. Stop

a)

5

b)

10

c)

15

d)

20

14.

Why is it important to write algorithms in the correct order?

a)

So the computer can guess what you mean

b)

So the steps make sense and the problem is solved correctly

c)

To make the program look interesting

d)

To use more memory

15.

Which of the following is an example of a condition in programming?

a)

If temperature >30> 30^\circ C, turn on the fan

b)

Draw a picture

c)

Eat lunch

d)

Read a book