wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Grade 5 - Python Types (int, float, str, bool, typecasting)

Total questions: 40

Worksheet time: 20mins

Name
Class
Date
1.

What type is 25?

a)

int

b)

float

c)

str

d)

bool

2.

What type is 25.5?

a)

int

b)

float

c)

str

d)

bool

3.

What type is 'Hello'?

a)

str

b)

int

c)

float

d)

bool

4.

What type is True?

a)

bool

b)

str

c)

int

d)

float

5.

What type is False?

a)

bool

b)

int

c)

str

d)

float

6.

What is the type of '123'?

a)

str

b)

int

c)

float

7.

What will int('5') become?

a)

5

b)

'5'

c)

5.0

d)

True

8.

What type is 3.0?

a)

float

b)

int

c)

str

d)

bool

9.

What type is 0?

a)

int

b)

str

c)

float

d)

bool

10.

What type is 'Python'?

a)

str

b)

int

c)

float

d)

bool

11.

What will str(10) become?

a)

'10'

b)

10

c)

10.0

d)

True

12.

What will float(4) become?

a)

4.0

b)

4

c)

'4'

d)

True

13.

What type is '4.5'?

a)

str

b)

float

c)

int

d)

bool

14.

What type is bool(1)?

a)

bool

b)

int

c)

str

d)

float

15.

What type is bool(0)?

a)

bool

b)

int

c)

str

d)

float

16.

What type is 'True'?

a)

str

b)

bool

c)

int

d)

float

17.

What will int(7.8) become?

a)

7

b)

7.8

c)

'7.8'

d)

True

18.

What will float('8') become?

a)

8.0

b)

'8.0'

c)

8

d)

True

19.

What type is type(5)?

(a)  

20.

What will str(3.5) become?

a)

'3.5'

b)

3.5

c)

3

d)

True

21.

What is the type of 'False'?

a)

str

b)

bool

c)

int

d)

float

22.

What type is 100?

a)

int

b)

float

c)

str

d)

bool

23.

What is the type of 10 / 2?

a)

float

b)

int

c)

str

d)

bool

24.

What is the type of 10 // 2?

a)

int

b)

float

c)

str

d)

bool

25.

What type is 0.99?

(a)  

26.

What type is '0.99'?

a)

str

b)

float

c)

int

d)

bool

27.

What type is bool('Hello')?

a)

bool

b)

str

c)

int

d)

float

28.

What type is bool('')?

a)

bool

b)

str

c)

int

d)

float

29.

What type is bool(10)?

a)

bool

b)

str

c)

int

d)

float

30.

What type is bool(0)?

a)

bool

b)

str

c)

int

d)

float

31.

What will int(3.9) become?

a)

3

b)

4

c)

3.0

d)

"3"

32.

What will float(7) become?

a)

7.0

b)

'7'

c)

7

d)

True

33.

What will str(False) become?

a)

'False'

b)

False

c)

0

d)

True

34.

What will str(True) become?

a)

'True'

b)

True

c)

1

d)

'1'

35.

What type is 12.0?

a)

float

b)

int

c)

str

d)

bool

36.

What will int('10') + 5 give?

a)

15

b)

'105'

c)

Error

d)

10.5

37.

What will str(5) + str(2) give?

a)

'52'

b)

7

c)

10

d)

52

38.

What will float('3.0') + 2 give?

a)

5.0

b)

'3.02'

c)

Error

d)

3.2

39.

What will bool('Python') return?

a)

True

b)

False

c)

None

d)

Error

40.

What will bool('') return?

a)

False

b)

True

c)

None

d)

Error