wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

03 - Python - Basics

Total questions: 10

Worksheet time: 10mins

Name
Class
Date
1.

Every variable is connected to a value, which is the information associated with that variable.

a)

True

b)

False

2.

Which is not followed variable rules?

a)

Variable name can contain only letters, numbers, and underscores.

b)

Spaces are not allowed in variable names.

c)

Avoid using Python keywords and function names as variable names.

d)

Variable names should be short but descriptive.

e)

Variable names can start with a number.

3.

What mark do you use to be considered a string in Python?

a)

'

b)

"

c)

/

d)

#

e)

*

4.

Data types in Python are:

a)

Strings

b)

Floating-point numbers

c)

Integers

d)

Settling-point numbers

e)

Interests

5.

Valid variable names are:

a)

current-balance

b)

Current Balance

c)

account4

d)

4account

e)

current_balance

6.

What mark do you use to be considered a comment in Python?

a)

'

b)

"

c)

/

d)

#

e)

*

7.

What mark do you use to be considered operator in Python?

a)

'

b)

"

c)

/

d)

#

e)

*

8.

Which is not showed in traceback when error happen?

a)

File name

b)

Line number

c)

Module name

d)

Error type explanation

e)

Correct syntax

9.

A method is an action that Python can perform on a piece of data.

a)

True

b)

False

10.

Valid constant name is:

a)

current-balance

b)

Current Balance

c)

account4

d)

4account

e)

CURRENT_BALANCE