wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Variable and Declaration 1

Total questions: 8

Worksheet time: 4mins

Name
Class
Date
1.

Declare and initiate student age variable with integer value of 13 years old using Python code.

a)

student Age = int(13)

b)

studentAge = int(13)

c)

studentAge = float(13)

d)

studentAge = (13)int

2.

Declare and initiate student height variable with float value of 1.69 meter using Python code.

a)

student Height = int(1.69)

b)

studentHeight = float(1.69)

c)

studentHeight = int(1.69)

d)

studentHeight = (1.69)float

3.

Declare and initiate student blood type variable with char value of “A”.

a)

blood type = A

b)

bloodType = "A"

c)

bloodType = int("A")

d)

blood Type = "A"

4.

Declare and initiate student name variable with string value of “Ahmad”.

a)

studentName = "Ahmad"

b)

student Name = Ahmad

c)

"student Name" = Ahmad

d)

student Name = int(Ahmad)

5.

Declare and initiate a Boolean variable variable with Boolean value of True.

a)

BooleanVariable = True

b)

Boolean Variable = True

c)

Boolean Variable = int(True)

d)

Boolean Variable = "(True)"

6.

Declare and initiate a customer age variable with integer value of 22 years old using Python code.

a)

customer Age = int(22)

b)

customerAge = int(22)

c)

customer Age = float(22)

d)

customerAge = (22)int

7.

Declare and initiate staff height variable with float value of 1.5 meter using Python code.

a)

staff Height = int(1.5)

b)

staffHeight = float(1.5)

c)

staffHeight = int(1.5)

d)

staffHeight = (1.5)float

8.

Declare and initiate car name variable with string value of “Proton”.

a)

carName = "Proton"

b)

car Name = Proton

c)

"car Name" = Proton

d)

car Name = int(Proton)