Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Quiz - 1

Total questions: 10

Worksheet time: 4mins

Name
Class
Date
1.

What is the data type of the following


aTuple = "Hello World"

print(type(aTuple))

a)

string

b)

list

c)

tuple

d)

complex

2.

Select the right way to create a string literal python's

a)

Str = ’python’s’

b)

str1 = ‘python\\’s’

c)

str1 = “””python’s”””

d)

str1 = ‘python\’s’

3.

what is the data type of print(type(“70.90”))

a)

string

b)

float

c)

int

d)

integer

4.

whats the result of print(Bool(0))

a)

Syntax error

b)

true

c)

False

d)

false

5.

whats the output of the following code

print(bool(0), bool(3.14159), bool(-6), bool(2.0+1k))


a)

False True False True

b)

False True True True

c)

True True False True

d)

True True False True

6.

What is used as comment in python

a)

??

b)

#

c)

//

d)

/*

7.

In Python 3, what is the type of type(range(10002))

a)

Int

b)

range

c)

string

d)

List

8.

If we change one data type to another, then it is called

a)

Type conversion

b)

Type casting

c)

Both of the above

d)

None of the above

9.

In which of the following data type, duplicate items are not allowed ?

a)

list

b)

set

c)

dictionary

d)

None of the above

10.

What is list data type in Python ?

a)

collection of integer number

b)

collection of string

c)

collection of same data type

d)

collection of different data type