WorksheetsCSSE Quiz Day2
Total questions: 12
Worksheet time: 5mins
Which of the following libraries are used in python programming?
Bootstrap
Numpy
Matplotlib
Pandas
Which of the following function is used to take input from the the user in python programming?
cin()
user()
inp()
input()
What is the data type of print(type(0xFF)) ?
number
hexint
hex
int
What is the output of the following code?
print(bool(0),bool(3.14159),bool(−3),bool(1.0+1j))
False True False True
True True False True
True True False True
False True True True
Which of the following cannot be a Python variable name?
Int_1
true
var-2
csse13
Which of the following is not a python datatype?
int
char
string
set
dic = {1: ’C’, 2: ’I’, 3: ’M’}
dic[4] = ’P’
print(dic)
{1: 'C', 2: 'I', 3: 'M', 4: 'P'}
{1: 'C', 2: 'I', 4: 'P'}
{4: 'P',1: 'C', 2: 'I'}
Error
What will be output of following python code?
var = 2013
print(2013==2013.0)
true
False
false
True
What will be output of following python code?
num = 4 + 0j
print(type(num))
int
float
complex
real
print(int(3.9))
4
3.9
Error
3
csse1 = {1,5,6,4,3}
print(csse1)
{1, 3, 4, 5, 6}
{1,5,6,4,3}
1,5,6,4,3
(1,5,6,4,3)
What is the output of the following?
year = 2013.0
name = "CSSE"
dept = "ITCA"
print (type(year), type(name), type(dept))
'float' 'str' 'str'
<class 'float'> <class 'str'> <class 'str'>
2013.0 CSSE ITCA
None
