wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Variables and Command (Task 3) Quiz

Total questions: 22

Worksheet time: 11mins

Name
Class
Date
1.

What is Small Basic?

a)

A language for web development

b)

A language for advanced programmers

c)

A complex programming language

d)

A programming language for beginners

2.

What are the two main categories of variables in programming?

a)

Numbers and Text

b)

Letters and Symbols

c)

Colors and Shapes

d)

Functions and Loops

3.

What is the purpose of using variables in programming?

a)

To make calculations and store data

b)

To browse the internet

c)

To create graphics

d)

To play music

4.

What is the correct syntax for assigning a value to a variable in Small Basic?

a)

VariableName : Value

b)

VariableName = Value

c)

Value : VariableName

d)

Value = VariableName

5.

What command is used to get text input from the user in Small Basic?

a)

TextWindow.Show()

b)

TextWindow.Read()

c)

TextWindow.Write()

d)

TextWindow.Remove()

6.

What is the purpose of the 'Else' keyword in programming?

a)

To display output

b)

To provide an alternative condition

c)

To end the program

d)

To start a loop

7.

What is the purpose of branching in programming?

a)

To jump to a different command

b)

To display messages

c)

To repeat a set of instructions

d)

To check for errors

8.

What is the correct syntax for a loop in Small Basic?

a)

For i = 1 To 10

b)

Loop i = 1 To 10

c)

Repeat i = 1 To 10

d)

While i = 1 To 10

9.

What is the purpose of using loops in programming?

a)

To repeat a set of instructions

b)

To display text on the screen

c)

To get user input

d)

To end the program

10.

What is a logical error in programming?

a)

A mistake in the design or sequence of commands

b)

A syntax error

c)

An error in typing variables

d)

An error in the output

11.

What is the correct way to join two strings in Small Basic?

a)

fullname = name + " " + surname

b)

fullname = name + surname

c)

fullname = name, surname

d)

fullname = name - surname

12.

What is the purpose of the 'If' keyword in programming?

a)

To define a condition

b)

To end the program

c)

To display output

d)

To start a loop

13.

What is the correct way to calculate Celsius from Fahrenheit in Small Basic?

a)

celsius = 5 * (fahrenheit - 32) / 9

b)

celsius = (fahrenheit - 32) * 5 / 9

c)

celsius = 9 * (fahrenheit - 32) / 5

d)

celsius = (fahrenheit - 32) / 5 * 9

14.

What is the purpose of the 'Step' keyword in a loop?

a)

To get user input

b)

To display output

c)

To end the loop

d)

To specify the increment value

15.

What is the correct way to display a number on the screen in Small Basic?

a)

TextWindow.Display(Boys)

b)

TextWindow.Print(Boys)

c)

TextWindow.ShowNumber(Boys)

d)

TextWindow.WriteLine(Boys)

16.

What is the correct syntax for defining a function in Small Basic?

a)

FunctionName : Parameters

b)

FunctionName = Parameters

c)

Parameters : FunctionName

d)

Parameters = FunctionName

17.

What is the purpose of using arrays in programming?

a)

To store multiple values under a single variable

b)

To perform mathematical calculations

c)

To display text on the screen

d)

To end the program

18.

What is the purpose of using functions in programming?

a)

To store multiple values under a single variable

b)

To repeat a set of instructions

c)

To perform mathematical calculations

d)

To end the program

19.

What is the correct syntax for a conditional statement in Small Basic?

a)

If condition Then

b)

Else condition

c)

End If

d)

Else If condition Then

20.

What is the purpose of using comments in programming?

a)

To repeat a set of instructions

b)

To provide explanations and make code more readable

c)

To store multiple values under a single variable

d)

To end the program

21.

What is the purpose of the 'Else If' keyword in programming?

a)

To provide an alternative condition

b)

To display output

c)

To end the program

d)

To start a loop

22.

What is the purpose of the 'For' loop in programming?

a)

To repeat a set of instructions a specific number of times

b)

To provide an alternative condition

c)

To end the program

d)

To start a loop