wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Basic Python Data Types

Total questions: 8

Worksheet time: 4mins

Name
Class
Date
1.

In Python 3, the maximum value for an integer is 263 - 1:

a)

True

b)

False

2.

What is the output when the following Python code is executed?

a = 3

b = '5'

c = '2'

print(a * b + c)

a)

17

b)

352

c)

5552

d)

Error message

3.

What is the output of the following Python code?

a = 13.5

b = -24.6

a, b = b, a

print(a, b)

a)

13.5 -24.6

b)

-24.6 13.5

c)

-13.5 24.6

d)

13.5 24.6

4.

What is the output of the following Python code?

print('Hello' + "world!")

a)

Helloworld!

b)

Hello world!

c)

'Hello' "world!"

d)

Error message

5.

What will the output be from the following Python code?

print(3+4)

a)

3+4

b)

7

c)

SyntaxError

d)

print(3+4)

6.

What will be the output from the following Python code?

print("3+4")

a)

7

b)

3+4

c)

34

d)

SyntaxError

7.

Which of the following data types can consist of numbers, alphabets and symbols?

a)

String

b)

Integer

c)

Float

d)

Boolean

8.

Which of the following data types is the most appropriate for 23 June 2020?

a)

Float

b)

Boolean

c)

Integer

d)

String