Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Unit 9.1 - Textual Programming

Total questions: 35

Worksheet time: 23mins

Name
Class
Date
1.

What is Small Basic?

a)

Instructions on a computer to complete a program

b)

A programming language used to create programs on a computer

2.

A program is ...

a)
A type of computer hardware.
b)
A set of instructions for a computer.
c)
A collection of data files.
d)
A programming language.
3.

What would the screen display when you run this code?


TextWindow.Writeline("Hello Everyone")

a)

Hello
Everyone

b)

"Hello" "Everyone"

c)

"Hello Everyone"

d)

Hello Everyone

4.

What would the screen display when you run this code?


TextWindow.Writeline("This is some text"

a)
This is some text
b)

"This is some text"

c)

Error - Missing a bracket

d)

TextWindow.Writeline("This is some text")

5.

Fill in the missing part of the code

(a)   .Writeline( "Hello World" )

6.

Which line of code would change the background colour to green

a)

TextWindow.Background = "Green"

b)

TextWindow.BackgroundColor = Green

c)

TextWindow.BackgroundColor(Green)

d)

TextWindow.BackgroundColor = "Green"

7.

Select all types of errors found programming from the choices below

a)

Typing error

b)

Syntax error

c)

Pattern error

d)

Logic error

8.

What would the following code output?

a)

b)

c)

d)

9.

What is a Variable?

a)

How we get computers to make calculations

b)

A temporary storage location for data

c)

Some text with quotation marks

d)

A window to type code

10.

Select two rules to follow when creating a Variable?

a)

Always start a variable name with a number

b)

Always start a variable name with a letter

c)

Give your variables meaningful names

d)

Use spaces in your variable names

11.

How many variables have been created in this program?

a)

2

b)

3

c)

5

d)

6

12.

What would the following program output?

a)

"numbersum"

b)

50

c)

Error!

d)

2030

13.

What would the following program output?

a)

The answer is ans

b)

The answer is 98

c)

The answer is 102

d)

The answer is 200

14.

Describe the purpose of the command on line 2?

a)

Reads a name from the program

b)

Guesses the name of the user

c)

Waits for the user to type in an answer and stores in a variable

d)

Outputs the users name

15.

What is output to the screen if this code runs and the user types Ali?

4 lines
16.

Which comparison operator is used for Less than?

a)

>

b)

<<

c)

<

d)

>>

17.

Which comparison operator is used for Greater than or equal to?

a)

>=

b)

<=

c)

=>

d)

=<

18.

What would the following code display if today was Tuesday?

a)

Friday

b)

Hooray

c)

Keep going

d)

Error!

19.

What would be the output of this code if the user entered 3?

a)

A

b)

B

c)

C

d)

Error

20.

What would be the output of this code if the user entered 16?

a)

A

b)

B

c)

C

d)

Error!

21.

Placing the following lines of code in order

1: (a)  

2: (b)  

3: (c)   ​

4:​ (d)  

5:​ (e)  

Choose from the below words
If (score > 5) Then
Else
Endif
TextWindow.WriteLine("Well Done")
TextWindow.WriteLine("Better luck next time")
22.

When would you use a For loop in a program?

a)

If you know how many times you want the computer to repeat the instructions

b)

If you want the program to repeat the instructions until a specific condition is true

23.

How many times will the instruction on line 2 run?

a)

Once

b)

Forever

c)

11

d)

12

24.

What is count in line 1?

a)

A Variable

b)

A Loop

c)

An Operator

d)

Function

25.

What would the following code output?

a)

b)

c)

d)

26.

Placing the following lines of code in order

​ 1: ​ (a)  

2:​ (b)  

3:​ (c)  

4:​ (d)  

5:​ (e)  

Choose from the below words
TextWindow.WriteLine( "Multiply numbers by 5:" )
number = 5
For a = 1 to 12
TextWindow.WriteLine(a + " x " + number + " = " +
EndFor
27.

When would you use a While loop in a program?

a)

If you know how many times you want the computer to repeat the instructions

b)

If you want the program to repeat the instructions until a specific condition is true

28.

How many times will the instruction on line 3 and 4 run?

a)

10

b)

4

c)

3

d)

0

29.

What would the following code do if the user entered "abc123"

a)

Access Granted (End Program)

b)

Access Granted (Enter Password again)

c)

Access Denied (End Program)

d)

Access Denied (Enter Password again)

30.

What does the first line of code do?

a)

Create a text box with "Graphics Window" displayed inside

b)

Set the title of the window to "Graphics Window"

31.

What do the numbers after Fill rectangle on line 4 mean?

a)

Position of rectangle on the screen

b)

Height and width of rectangle

c)

Colour of the rectangle

d)

Position, height and width of the rectangle

32.

What would the program below output?

a)

b)

c)

d)

33.

What would the program below output?

a)

b)

c)

d)

34.

What would the program below output?

a)

b)

c)

d)

35.

This code is supposed to make the turtle draw a square. What is wrong with this code?

a)

The turtle starts in the wrong place

b)

The for loop should be 1 to 4

c)

The angle of the turn should be 180

d)

The turtle's x and y co-ordinates are wrong