wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

S4 Programming Recap

Total questions: 17

Worksheet time: 9mins

Name
Class
Date
1.
Why should a programmer add comment statements to their code?
a)
It makes the program run faster
b)
It makes the code easier to read and understand
c)
It means less variables are needed
d)
It means programs will run on both Macs and PCs
2.
What variable type should be used to store a cyclist's name?
a)
String
b)
Integer
c)
Single
d)
Boolean
3.
What variable type should be used to store the number of books in an order?
a)
String
b)
Integer
c)
Single
d)
Boolean
4.
What variable type should be used to store a final bill in a restaurant?
a)
String
b)
Integer
c)
Single
d)
Boolean
5.
What variable type should be used to store a value which can only be True or False?
a)
String
b)
Integer
c)
Single
d)
Boolean
6.
What is the purpose of this If statement?  If numberOfBooks > = 10 and numberOfBooks < =20 Then  Bill = Bill * 0.9  End If
a)
Subtracts 10% from the Bill variable if the numberOfBooks variable is between 10 and 20
b)
Adds 90p to the Bill if the numberOfBooks variable is between 10 and 20
7.
What is the purpose of this conditional loop?  Do  Percentage = InputBox("Enter %")  Loop Until Percentage >= 0 and Percentage <= 100
a)
Asks the user to enter a percentage 10 times
b)
Asks the user to enter a percentage and loops until it is between 0 and 100
c)
Asks the user to enter a percentage and loops until it is less than 0 and more than 100
d)
Asks the user to enter a percentage and loops until it is less than 0 or more than 100
8.
What is the name of this standard algorithm?  Do  Percentage = InputBox("Enter %")  Loop Until Percentage >= 0 and Percentage <= 100
a)

Input Validation

b)

Find Maximum

c)

Find Minimum

d)

Linear Search

9.
What is the name of the operation carried out by the '&' symbol
a)
Concatenation
b)
Consideration
c)
Joination
d)
Ampersandation
10.
What is the purpose of the VbTab command?
a)
Allows the programmer to align or space out output
b)
Formats a number as currency
c)
Inserts a table into a list box
d)
Rounds a number
11.

Which standard algorithm is shown here:

For x = 1 to 10

MsgBox(PupilNames(x))

Next x

a)

Traversing an array

b)

Running total

12.

Which standard algorithm is shown here:

For x = 1 to 4

Value = InputBox("Enter the car value")

Total = Total + Value

Next x

a)

Traversing an array

b)

Running total

13.

What is an array

a)

A set of variables

b)

A data structure that stores a list of values of the same type

c)

A data structure that stores a list of values of the different types

d)

A variable that stores a list of values

14.

How would you declare an an array that stores 20 marks?

a)

Dim 20 Marks as Integer

b)

Dim (20) Marks as Integer

c)

Dim Marks as Integer (20)

d)

Dim Marks(20) as Integer

15.

Which predefined function generates a random number?

a)

Rnd()

b)

Math.Round()

c)

Len()

16.

Which predefined function rounds a number?

a)

Rnd()

b)

Math.Round()

c)

Len()

17.

Which predefined function returns the number of characters in a string?

a)

Rnd()

b)

Math.Round()

c)

Len()