wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Variables

Total questions: 11

Worksheet time: 4mins

Name
Class
Date
1.

What will it print

(a)  

2.

What will it print

a)

Error

b)

15

c)

print

d)

'15'

3.

Can we use reserved names as variable name

a)

True

b)

False

c)

I don't know

4.

What will it print

a)

b)

c)

5.

Make a variable named var and assign value as value

(a)  

6.

Why the following variable name invalid for python:


1st_Name = 153156456456415

a)

No special characters other than underscore

b)

The variable name starts with a number

c)

Keep names meaningful

d)

There is nothing wrong with this variable name

7.

x = str(3)
y = int(3)
z = float(3)

a)

x = 3

y = 3

x = 3.00

b)

x = '3'

y = 3

z = 3.0

c)

x = '3

y = 3

z = 3.0

d)

x = 3

y = 3

z = 3.0

8.

.P = 5

print(.P)

a)

5

b)

5.0

c)

'5'

d)

Error

e)

int(5)

9.

Which one is/are variables

a)

x = 5

x = str(5)

x = int(5)

x = float(5)

x = [5]

x = (5)

x = {5:5}

b)

x = 5

x = str(5)

x = int(5)

x = floata(5)

x = [5]

x = (5)

c)

x = 5

x = str(5)

x = int(5)

x = float(5)

x = [5]

x = (5)

x = {0:5}

x = '5'

d)

x = 5

x = int((5)

x = float(5)

x = [5]

x = (5)

x = {5:5}

e)

None of the above

10.
a)

5

b)

Error

c)

10

d)

'10'

11.

How is/was the quiz

a)

Hard

b)

Easy

c)

Medium