wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Year 8 - Unit 2: Small Basic Programming Terminology

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is a variable ?

a)

Something that stays the same

b)

A named container for data

c)

A list of a number of items

d)

A table of information

2.

What is an array ?

a)

A selection

b)

A loop

c)

A named container for one item of data

d)

A collection of a number of items of data

3.

When writing code, it is important to remember to make our code easily maintainable. Which of the following help programmers maintain our code in future (you may select more than one answer) ?

a)

giving variables sensible and meaningful names

b)

commenting your code

c)

make the code really complicated and hard to follow

d)

Indenting loops like a paragraph, so we can see where they start and end

4.

Which of the following are important in making sure our code is robust ?

a)

making sure the code runs as inefficiently as possible

b)

making sure the program is very complicated

c)

giving the code a funny filename

d)

using validation

5.

Why is important to use declared variables to set our loops and conditions as opposed to just typing the numbers in ?

a)

There are no variables in code

b)

So we only need to change the value of the variable to change the code's behaviour

c)

You shouldn't do this. It is best to use numbers all the time.

d)

The code won't work unless we declare the variables

6.

What is a collection of data in code that is a little like a table ?

a)

a one dimensional array

b)

a variable

c)

a two dimensional array

d)

an eight dimensional array

7.

Small Basic: In the two dimensional array here - called bookings - what data is at location bookings[1][2] ?

a)

Williamson

b)

Miss

c)

Joseph

d)

Eva

8.

In the bookings array, using Small Basic, what would be the location of Eva Smith's phone number ?

a)

bookings(2)(4)

b)

[4,2]

c)

bookings[4][2]

d)

bookings[2][4]

9.

In Small Basic, what code would be best to overwrite the value for the number of games booked by Joseph Williamson ?

a)

bookings[1][5] = TextWindow. ReadNumber()

b)

bookings[5][1] = TextWindow.Read()

c)

TextWindow. ReadNumber = bookings[1][5]

d)

bookings[1] = Read()

10.

For i = 1 to 10

Is this an example of a count-controlled loop or a condition-controlled loop ?

a)

Count controlled

b)

Condition controlled