Font size
WorksheetsInternship on "ML & DL using Python"
Total questions: 35
Worksheet time: 18mins
What would be the output?
animals = ["Zebra", "Elephant", "Lion", "Tiger"]
print (animals [-1])
Zebra
Elephant
Lion
Tiger
Identify the type of data structure.
s = ( )
List
Tuple
Dictionary
String
What will be the output?
list1 = 'tuple'
print (type(list1))
list
tuple
str
dict
What will be the output?
str1 = "DEPARTMENT"
print (str1 [15])
DEPARTMENT
DEPT
Index Error
" "
CNN stands for ------------------------
Computer Neural Network
Central Neural Network
Convolutional Node Network
Convolutional Neural Network
In RNN, data present in the form of Time Series.
True
False
Which symbols are used to open and close a dictionary?
( )
[ ]
< >
{ }
What would be the output?
list1 = [“apple”, “grape”, “orange”, “watermelon”]
list1.append("Kiwi")
print (list1)
['apple', 'grape', 'orange', 'watermelon']
['apple', 'grape', 'orange', 'watermelon', 'Kiwi']
['Kiwi', 'apple', 'grape', 'orange', 'watermelon']
Error
What will be the output?
d = 10 != 11
print (d)
10
11
True
False
Identify the arithmetic operator which is used to calculate remainder of the division.
#
%
**
//
Identify the sentences which are correct.
1. Tuples in Python are immutable
2. Lists in Python are mutable
1 is correct
2 is correct
Both 1 and 2 are correct
1 is correct, 2 is wrong
In CNN, ______ layer is represented in the form of arrays of pixel values.
Input Layer
Output Layer
Pixel Layer
Hidden Layer
Identify the different pooling layers which are present in CNN.
Max Pooling
Sum Pooling
Pixel Pooling
Average Pooling
What would be the output?
colors = ["red", "green", "white", "blue"]
print (type(colors))
("red", "green", "white", "blue")
<class 'tuple'>
<class 'dict'>
<class 'list'>
What will be the output?
print (15//6)
2.5
2
1
1.5
What will be the output?
str5 = "Neurons.123"
print (len(str5))
10
11
12
9
In CNN, _________ layer is used for converting the data into a 1-dimensional array for inputting it to the next layer.
Input
Pooling
Flattening
Convolution
Choose the correct output of the following code.
for i in range(0,5,3):
print (i)
0
1
2
3
0
2
4
0
3
0
3
5
What will be the output?
a = 5
b = 2
print (a**b)
5*2
5
10
25
In data visualization, ____ function is used to find number of rows and columns.
pandas
shape
size
numpy
In matplotlib, -------- is used to label x-axis.
labelx
xlabel
xlebel
title
In matplotlib, ---------- is used to display only grid lines for the x-axis:
grid(axis = 'x')
grid('x')
grid(axis = 'y')
gridx()
iloc stands for ---------
instant location
image location
integer location
integration location
Which of the following features are related to Python programming?
1. Dynamically typed
2. Python works only on Linux
3. Non-portable
1 and 2
only 2
1 and 3
only 1
What will be the output ?
print (type(3.5 // 2))
1.0
1.75
<class 'int'>
<class 'float'>
In python, pip stands for __________
performance installer python
preferred installer program
processing installer program
python installer program
In OpenCV, for BGR, we pass a tuple (0, 255, 0) for _____ color.
Red
Blue
Green
White
What is the use of barh( ) function?
To plot scatter graph
To plot vertical bar graph
To plot horizontal bar graph
To plot pie graph
----- function is used to give super titles in subplots.
title( )
supertitle( )
super.title()
suptitle()
What is the output of the following code?
print (type("cv2.imshow"))
cv2.imshow
It displays the image onto the screen.
<class 'str'>
<class 'cv2'>
What will be the output ?
a1 = 1
b1 = 1
print ("a1 + b1")
1 1
2
a1 + b1
Error
What will be the output ?
s1 = "Hello"
s2 = "\tGanesh"
print (s1 + s2)
Hello\tGanesh
HelloGanesh
Hello Ganesh
Hello
Ganesh
a1 = 1
b1 = 0
list1 = a1 * b1
print (list1)
1
0
[ 1, 0]
1 0
numpy stands for _______
Numbered Program
Numerator Python
Numerical Python
Numerical Program
In data visualization, ______ is used to find data type of each variable.
datatypes
dtypes
types
iloc
