wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python Basics Test

Total questions: 30

Worksheet time: 30mins

Name
Class
Date
1.

An error that will stop code from working/program from running.

a)

Semantic error

b)

Logic error

c)

Syntax error

2.

Information coming OUT of program. Often this is achieved using print command.

a)

Output

b)

Input

c)

Process

d)

Syntax

3.

A set of actions or events that must be carried out in the same order every time.

a)

Decision

b)

Sequence

c)

Function

4.

Data that is stored in a named location. These can change or be changed.

a)

Integer

b)

Sequence

c)

String

d)

Variable

5.

Less than

a)

<

b)

>

c)

=>

d)

=<

6.

A loop that will repeat for a set number of times.

a)

For Loop

b)

While Loop

c)

Infinite Loop

7.

This means "Then do this"

a)

Boolean

b)

:

c)

Function

d)

=

8.

Loop or repetition. Sections of code or algorithmic instructions that are repeated.

a)

Insertion

b)

Iteration

c)

Abstraction

d)

Selection

9.

Equal to or less than

a)

ELIF

b)

=<

c)

=>

d)

=

10.

Otherwise. This pairs with an IF statement to run code when IF statement condition is false.

a)

ELSE

b)

While Loop

c)

And

11.

#This is a comment to help understand the lines of code

a)

Selection

b)

Declaration

c)

Testing

d)

Comment

12.

The text that is displayed when program is run. In Python, this is green and in quotation marks.

a)

Array

b)

String

c)

Double

d)

Float

13.

Assigning variables

a)

Debug

b)

Boolean

c)

=

d)

:

14.

A set of precise step by step instructions to achieving a specific outcome.

a)

Iteration

b)

Parameter

c)

Algorithm

d)

Function

15.

A whole number (no decimal places)

a)

Boolean

b)

String

c)

Integer

d)

Ordinal

16.

The structure of statements in a computer language. This is like grammar for code.

a)

Syntax

b)

Semantics

c)

Logic

d)

Sequence

17.

An additional IF. Allows you to check multiple conditions.

a)

ELIF

b)

ELSE

c)

Debug

d)

While Loop

18.

A conditional statement. IF something is true then 'sequence A' will run. IF is it is not 'sequence B' will run. (allows selection to happen)

a)

ELIF

b)

Loop

c)

IF Statement

d)

Iteration

19.

More than

a)

<

b)

>

c)

=>

d)

=<

20.

Running program at different stages to check that it is running correctly.

a)

Design

b)

Testing

c)

Iteration

d)

Debug

21.

A decision or choice. It is the place where an algorithm or program branches in different directions.

a)

Insertion

b)

Selection

c)

Testing

d)

Iteration

22.

An error that does not stop the program from running, but means that it doesn't do as expected.

a)

Logical error

b)

Syntax error

c)

Debug error

23.

A condition that is True/False

a)

Integer

b)

String

c)

Float

d)

Boolean

24.

Data entered INTO a program or computer system.

a)

Syntax

b)

Input

c)

Output

d)

Storage

25.

Syntax highlighted purple

a)

Function

b)

ELIF

c)

Variable

d)

Integer

26.

To find and fix errors in code.

a)

Debug

b)

!=

c)

Python

d)

Testing

27.

Accesses modules of code from the python library

a)

Import

b)

Filter

c)

Export

d)

Call

28.

A coding language that you are using to create programs in our programming unit.

a)

Python

b)

JavaScript

c)

Php

d)

Java

29.

A loop that will make a set of instructions repeat while a status is TRUE

a)

For Loop

b)

While Loop

c)

Infinite Loop

30.

Not Equal to

a)

=?

b)

!=

c)

<>

d)

-=