wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Amethyst: Introduction to Python Quiz

Total questions: 11

Worksheet time: 6mins

Name
Class
Date
1.

What is the purpose of syntax in text-based programming languages?

a)

To guide how statements and phrases are constructed

b)

To confuse programmers

c)

To slow down program execution

d)

To hide errors

2.

How are statements terminated in Python and most text-based programming languages?

a)

With a comma

b)

With a question mark

c)

With a full stop

d)

With a semi-colon

3.

What are the two main types of errors in programming?

a)

Syntax errors and Logical errors

b)

Syntax errors and Runtime errors

c)

Runtime errors and Logical errors

d)

Syntax errors and Semantic errors

4.

Identifiers in Python must start with which of the following?

a)

A special character

b)

A number

c)

An underscore

d)

A space

5.

Which errors are detected by the Python IDLE?

a)

Runtime errors

b)

Semantic errors

c)

Syntax errors

d)

Logical errors

6.

Differentiate between identifiers and keywords.

a)

Identifiers are reserved words, keywords are names of entities

b)

Identifiers are part of Python language, keywords are special words

c)

Identifiers are names of entities, keywords are reserved words

d)

Identifiers are special words, keywords are part of Python language

7.

Which of the following are valid identifiers?

a)

if, else, 2baba, road Y, #size

b)

x, abel, road_y, _40

c)

print, while, 69ine, road_y, _40

d)

import, def, 2baba, road Y, #size

8.

If a function contains more than one argument, how are the arguments separated?

a)

With a semi-colon

b)

With a full stop

c)

With a comma

d)

With a question mark

9.

What is the purpose of a function in programming?

a)

To confuse programmers

b)

To perform a specific task

c)

To hide errors

d)

To slow down program execution

10.

What is the order in which a computer solves a problem?

a)

Output, Process, Input

b)

Input, Process, Output

c)

Process, Output, Input

d)

Process, Input, Output

11.

What does syntax refer to in programming languages?

a)

A

b)

B