wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Data Handling in Python

Total questions: 10

Worksheet time: 10mins

Name
Class
Date
1.

Choose the numeric data types Python Provides.

a)

Integer , Strings

b)

Signed Integers, Boolean, Floating Point numbers, Complex Numbers

c)

Integers, Complex Numbers

d)

Strings, Boolean

2.

Boolean Data types are considered as integers because True is considered as 1 and False as 0

a)

yes

b)

no

3.

How do Python represent a Complex number with real part (3) and imaginary part ( -2.5)

a)

3+2.5i

b)

3-2.5i

c)

3+2.5j

d)

3-2.5j

4.

What is the output of the following code?

r=2.5+3.9j

print(r.imag)

(a)  

5.

______ data types store values of more than one data type

a)

List

b)

Tuple

c)

Float

d)

Dictionary

6.

Choose the mutable data types.

a)

List

b)

Dictionaries

c)

Integer

d)

String

7.

a)Built-in function ____ returns the type of an object.

b)Built-in function ______ returns the address of an object.

c)Built-in function ____ displays value of an object.

a)

type( ) , val( ) , print( )

b)

type( ) , id( ) , print( )

c)

print( ) , type( ) , input( )

8.

What will be the output of the following code?

str="Young World"

id(str[8])

id(str[-3])

a)

Both the id ( ) functions will give the same address value

b)

Both the id ( ) functions will give different address value

9.

Choose the immutable data type.

a)

Tuples

b)

List

c)

Set

d)

Dictionaries

10.

Do you think the CS Online class is interesting?

a)

yes

b)

no

c)

may be

d)

no comments