WorksheetsProgramming - N4/5 Week 3
Total questions: 20
Worksheet time: 10mins
A variable type which can be used to store letters, numbers and symbols is a...
(a)
A variable type which can be used to store whole numbers is an...
(a)
A variable type which can be used to store a True of False option is a...
(a)
The data below would be best stored as which variable type?
FK2 7ZY
String
Integer
Floating Point Number
Character
Boolean
The data below would be best stored as which variable type?
62
String
Integer
Floating Point Number
Character
Boolean
The data below would be best stored as which variable type?
B
String
Integer
Floating Point Number
Character
Boolean
Read the code provided: if the user enters 8 what will the output be?
Correct! Well done!
Too high, try again!
Too low, try again!
The program will break
Complete the code below:
Dim password As String
'Get the user input for password
(a) ("Enter password")
What is the following code doing: TotalMarks = 8
Declaring a variable
Assigning a value to a variable
Performing a calculation
Finding the running total
How would you declare a variable for the age of someone?
DECLARE Age as decimal
DIM Age as integer
DIM Age as Single
DECLARE Age as integer
How would you get input from the user to store the username?
username = ("Enter your username")
("Enter your username") = username
username = Input("Enter your username")
username = InputBox("Enter your username")
What is the code to display the value in the result variable?
Msg = ("Your result is " & result)
MsgBox("Your result is " & result)
output("Your result is " & result)
None of the above
Which of the following is a relational operator that means “Less than or Equal to”?
<=
>=
<>
=<
What would the following code display?
answer = 2 * 10
MsgBox("Your answer is " & answer)
Your answer is 20
Your answer is 12
You are answer is 20
20
What is a condition?
Something that is true or false
Something that is conditional
Something that depends on something else
Something that you need to figure out
What is the purpose of a fixed loop?
To repeat a section of code multiple times
To repeat a section of code depending on a condition
To repeat a section of code
To repeat a section of code a fixed amount of times
What will the output message be if 50 is entered as the grade?
A
B
C
You did not pass
Reading the code provided: What will the program output if the user inputs "Yellow71"?
Password Correct
Password Incorrect
The program will crash
What does this symbol mean?
<
Less than
More than
Equal to
Not Equal to
What does this symbol mean?
<>
Less than
More than
Equal to
Not Equal to
