Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CSSE Quiz Day2

Total questions: 12

Worksheet time: 5mins

Name
Class
Date
1.

Which of the following libraries are used in python programming?

a)

Bootstrap

b)

Numpy

c)

Matplotlib

d)

Pandas

2.

Which of the following function is used to take input from the the user in python programming?

a)

cin()

b)

user()

c)

inp()

d)

input()

3.

What is the data type of print(type(0xFF))print\left(type\left(0xFF\right)\right) ?

a)

number

b)

hexint

c)

hex

d)

int

4.

What is the output of the following code?

print(bool(0),bool(3.14159),bool(−3),bool(1.0+1j))print(bool(0),bool(3.14159),bool(-3),bool(1.0+1j))

a)

False True False True

b)
  • True True False True

c)
  • True True False True

d)
  • False True True True

5.
  • Which of the following cannot be a Python variable name?

a)

Int_1

b)

true

c)

var-2

d)

csse13

6.

Which of the following is not a python datatype?

a)

int

b)

char

c)

string

d)

set

7.

dic = {1: ’C’, 2: ’I’, 3: ’M’}
dic[4] = ’P’
print(dic)

a)

{1: 'C', 2: 'I', 3: 'M', 4: 'P'}

b)

{1: 'C', 2: 'I', 4: 'P'}

c)

{4: 'P',1: 'C', 2: 'I'}

d)

Error

8.

What will be output of following python code?

var = 2013

print(2013==2013.0)

a)

true

b)

False

c)

false

d)

True

9.

What will be output of following python code?

num = 4 + 0j

print(type(num))

a)

int

b)

float

c)

complex

d)

real

10.

print(int(3.9))

a)

4

b)

3.9

c)

Error

d)

3

11.

csse1 = {1,5,6,4,3}

print(csse1)

a)

{1, 3, 4, 5, 6}

b)

{1,5,6,4,3}

c)

1,5,6,4,3

d)

(1,5,6,4,3)

12.

What is the output of the following?
year = 2013.0
name = "CSSE"
dept = "ITCA"
print (type(year), type(name), type(dept))

a)

'float' 'str' 'str'

b)

<class 'float'> <class 'str'> <class 'str'>


c)

2013.0 CSSE ITCA

d)

None