WorksheetsUnit 9.1 - Textual Programming
Total questions: 35
Worksheet time: 23mins
What is Small Basic?
Instructions on a computer to complete a program
A programming language used to create programs on a computer
A program is ...
What would the screen display when you run this code?
TextWindow.Writeline("Hello Everyone")
Hello
Everyone
"Hello" "Everyone"
"Hello Everyone"
Hello Everyone
What would the screen display when you run this code?
TextWindow.Writeline("This is some text"
"This is some text"
Error - Missing a bracket
TextWindow.Writeline("This is some text")
Fill in the missing part of the code
(a) .Writeline( "Hello World" )
Which line of code would change the background colour to green
TextWindow.Background = "Green"
TextWindow.BackgroundColor = Green
TextWindow.BackgroundColor(Green)
TextWindow.BackgroundColor = "Green"
Select all types of errors found programming from the choices below
Typing error
Syntax error
Pattern error
Logic error
What would the following code output?
What is a Variable?
How we get computers to make calculations
A temporary storage location for data
Some text with quotation marks
A window to type code
Select two rules to follow when creating a Variable?
Always start a variable name with a number
Always start a variable name with a letter
Give your variables meaningful names
Use spaces in your variable names
How many variables have been created in this program?
2
3
5
6
What would the following program output?
"numbersum"
50
Error!
2030
What would the following program output?
The answer is ans
The answer is 98
The answer is 102
The answer is 200
Describe the purpose of the command on line 2?
Reads a name from the program
Guesses the name of the user
Waits for the user to type in an answer and stores in a variable
Outputs the users name
What is output to the screen if this code runs and the user types Ali?
Which comparison operator is used for Less than?
>
<<
<
>>
Which comparison operator is used for Greater than or equal to?
>=
<=
=>
=<
What would the following code display if today was Tuesday?
Friday
Hooray
Keep going
Error!
What would be the output of this code if the user entered 3?
A
B
C
Error
What would be the output of this code if the user entered 16?
A
B
C
Error!
Placing the following lines of code in order
1: (a)
2: (b)
3: (c)
4: (d)
5: (e)
When would you use a For loop in a program?
If you know how many times you want the computer to repeat the instructions
If you want the program to repeat the instructions until a specific condition is true
How many times will the instruction on line 2 run?
Once
Forever
11
12
What is count in line 1?
A Variable
A Loop
An Operator
Function
What would the following code output?
Placing the following lines of code in order
1: (a)
2: (b)
3: (c)
4: (d)
5: (e)
When would you use a While loop in a program?
If you know how many times you want the computer to repeat the instructions
If you want the program to repeat the instructions until a specific condition is true
How many times will the instruction on line 3 and 4 run?
10
4
3
0
What would the following code do if the user entered "abc123"
Access Granted (End Program)
Access Granted (Enter Password again)
Access Denied (End Program)
Access Denied (Enter Password again)
What does the first line of code do?
Create a text box with "Graphics Window" displayed inside
Set the title of the window to "Graphics Window"
What do the numbers after Fill rectangle on line 4 mean?
Position of rectangle on the screen
Height and width of rectangle
Colour of the rectangle
Position, height and width of the rectangle
What would the program below output?
What would the program below output?
What would the program below output?
This code is supposed to make the turtle draw a square. What is wrong with this code?
The turtle starts in the wrong place
The for loop should be 1 to 4
The angle of the turn should be 180
The turtle's x and y co-ordinates are wrong
