Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Programming - N4/5 Week 3

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

A variable type which can be used to store letters, numbers and symbols is a...

(a)  

2.

A variable type which can be used to store whole numbers is an...

(a)  

3.

A variable type which can be used to store a True of False option is a...

(a)  

4.

The data below would be best stored as which variable type?


FK2 7ZY

a)

String

b)

Integer

c)

Floating Point Number

d)

Character

e)

Boolean

5.

The data below would be best stored as which variable type?


62

a)

String

b)

Integer

c)

Floating Point Number

d)

Character

e)

Boolean

6.

The data below would be best stored as which variable type?


B

a)

String

b)

Integer

c)

Floating Point Number

d)

Character

e)

Boolean

7.

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

8.

Complete the code below:


Dim password As String


'Get the user input for password

(a)   ("Enter password")

9.

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

10.

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

11.

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")

12.

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

13.

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

a)

<=

b)

>=

c)

<>

d)

=<

14.

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

15.

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

16.

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

17.

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

a)

A

b)

B

c)

C

d)

You did not pass

18.

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

19.

What does this symbol mean?


<

a)

Less than

b)

More than

c)

Equal to

d)

Not Equal to

20.

What does this symbol mean?


<>

a)

Less than

b)

More than

c)

Equal to

d)

Not Equal to