Small Basic
Small Basic
Small Basic
Python
Python
100

Which instruction allows a Small Basic program to make a decision?

If

100

What is the purpose of a counter in a loop?

It keeps track of the number of repetitions.

100

What is a list in Small Basic?

A collection of values stored under one list name.

100

 Which loop repeats a block of code for each item in a sequence?

The for loop

100

What is a variable in Python?

 A named storage location for a value.

200

Which instruction is used when the first condition is false but another condition must be checked?

ElseIf

200

What happens if a counter is never increased inside a loop?

The loop may become infinite.

200

What can be stored in a list?

Multiple values, such as names, numbers, or scores.

200

What is a nested loop?

A loop placed inside another loop.

200

What does it mean to define a global variable?

To create a variable that can be accessed from different parts of the program.

300

What is the purpose of using Else in an If structure?

It runs when none of the previous conditions is true.

300

Which loop is useful when the number of repetitions is known in advance?

The For loop.

300

Which operation allows a programmer to display the values stored in a list?

Reading or accessing the list elements.

300

If an outer loop repeats 3 times and an inner loop repeats 4 times for each outer repetition, how many times does the inner instruction execute?

12 times

300

A variable stores the score of a game and is needed by several functions. What type of variable may be suitable?

A global variable.

400

A program must display “Excellent” for a mark above 90, “Good” for a mark above 70, and “Try again” otherwise. Which structure is suitable?

A nested If or an If–ElseIf–Else structure.

400

A program must display the numbers from 1 to 20 but skip even numbers. What should be placed inside the loop?

A condition that checks whether the number is odd.

400

If the same instructions are needed in three different parts of a program, what is the best solution?

Create one sub procedure and call it whenever needed.

400

Which Python library can be used to draw shapes?

The turtle library.

400

How can a programmer draw a square without writing four separate movement instructions?

By using a loop that repeats the movement and turning four times.

500

A While loop never stops because its condition remains true. What should the programmer check first?

The counter or variable that should change inside the loop.

500

What is a sub procedure?

A named group of instructions that performs a specific task.

500

Which programming structure can be used to examine every item in a list?

A loop.

500

Why can global variables be useful?

They allow different functions or sections of a program to use the same value.

500

Which command is commonly used to import the turtle library?

import turtle.

M
e
n
u