wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Programming S3

Total questions: 25

Worksheet time: 14mins

Name
Class
Date
1.
What is a variable
a)
Anything that changes
b)
A space in memory used to store values while a program is running
c)
A construct for making decisions in a program
d)
A construct for repeating a section of code
2.

Which data type stores text/characters?

a)

String

b)

Integer

c)

Single

3.

Which data type stores whole numbers?

a)

String

b)

Integer

c)

Single

4.

Which data type stores real numbers?

a)

String

b)

Integer

c)

Single

5.

What is the following code doing: TotalMarks = 8

a)

Declaring a variable

b)

Assigning a value to a variable

c)

Performing a calculation

d)

Finding the running total

6.

How would you declare a variable for the age of someone?

a)

DECLARE Age as decimal

b)

DIM Age as integer

c)

DIM Age as Single

d)

DECLARE Age as integer

7.

How would you get input from the user to store the username?

a)

username = ("Enter your username")

b)

("Enter your username") = username

c)

username = Input("Enter your username")

d)

username = InputBox("Enter your username")

8.

________________ is used to accept input from the user.

a)

Label

b)

InputBox

c)

MsgBox

d)

ListBox

9.

What is the code to display the value in the result variable?

a)

Msg = ("Your result is " & result)

b)

MsgBox("Your result is " & result)

c)

output("Your result is " & result)

d)

None of the above

10.

What is used to execute the program?

a)
b)
c)
11.

Which of the following is a relational operator that means “Less than or Equal to”?

a)

<=

b)

>=

c)

<>

d)

=<

12.

What would the following code display?

answer = 2 * 10

MsgBox("Your answer is " & answer)

a)

Your answer is 20

b)

Your answer is 12

c)

You are answer is 20

d)

20

13.

What is a condition?

a)

Something that is true or false

b)

Something that is conditional

c)

Something that depends on something else

d)

Something that you need to figure out

14.

What is the purpose of a fixed loop?

a)

To repeat a section of code multiple times

b)

To repeat a section of code depending on a condition

c)

To repeat a section of code

d)

To repeat a section of code a fixed amount of times

15.

What will the output message be if 50 is entered as the grade?

a)

A

b)

B

c)

C

d)

You did not pass

16.

How would you ask to user to enter a surname into the program?

a)

Surname = InputBox("Enter your surname")

b)

string = SurnameTextbox

c)

Surname = String

d)

Surname = MsgBox("Enter your surname")

17.

Read the code provided: if the user enters 8 what will the output be?

a)

Correct! Well done!

b)

Too high, try again!

c)

Too low, try again!

d)

The program will break

18.

Which line of code will display a message to the user correctly?

a)

Inputbox("Hello")

b)

MsgBox = ("Hello")

c)

MsgBox("Hello")

d)

("Hello")

19.

Reading the code provided: What will the program output if the user inputs "Yellow71"?

a)

Password Correct

b)

Password Incorrect

c)

The program will crash

20.

What does this symbol mean?


<

a)

Less than

b)

More than

c)

Equal to

d)

Not Equal to

21.

What does this symbol mean?


<>

a)

Less than

b)

More than

c)

Equal to

d)

Not Equal to

22.

Which one of the following is NOT a type of test data

a)

Normal

b)

Extreme

c)

Exceptional

d)

Acceptable

23.

Match the test data type to the description

Exceptional

Within the boundaries of the program

Extreme

The limits of the program

Normal

Outside the boundary or wrong data type

24.

Identify the error

a)

Logic

b)

Syntax

c)

Execution

25.

A program should accept 100 as the upper limit of the program, but keeps displaying the wrong message.

Identify the error.

a)

Logic

b)

Syntax

c)

Execution