Professional Documents
Culture Documents
NO
SRM Institute of Science and Technology
Mode of Exam
College of Engineering and Technology
OFFLINE
School of Computing
DEPARTMENT OF COMPUTING TECHNOLOGIES
SRM Nagar, Kattankulathur – 603203, Chengalpattu District, Tamil Nadu
Academic Year: 2022-2023(ODD)
Test: CLAT- 3
Course Code & Title: 21CSS101J / Programming for Problem Solving Duration:20 min
Year & Sem:I / I Max. Marks20
Course Learning Rationale (CLR)
CLR-5: Create basic Abstract Data Types with python, create applications using suitable python library
functions for solving data science problems.
Course Learning Outcomes (CLO):
CLO-5: To create programs using the python data types, loops, control statements for problem solving.
To implement the suitable python library based solutions for solving statistical problems
COURSE ARTICULATION MATRIX (CAM)
PO1 PO2 PO3 PO4 PO PO6 PO7 PO8 PO9 PO10 PO1 PO12
5 1
C0 2 3 2
5
Part – A
(20 x 1 = 20 Marks)
A. %s
B. %f
C. %x or %X
D. %o
A. Assignment statement
B. Iterative statement
C. Function declaration statement
D. Binding
9. Select the symbol used to represent the start of indentation in python? 1 3 5 1 2.6.1
A. #
B. &
C. :
D. %
A. Three
B. Two
C. Multi
D. One
A. complex(x)
B. complex(real,imag)
C. complex (x,base)
D. complex()
A. import numpy as mp
B. import numpy as um
C. import numpy as np
D. import numpy as py
A. arithmetic mean
B. percentile
C. mode
D. Median
A. 5
B. 3
C. 4
D. 2
A. Slicing
B. Binding
C. Indexing
D. Reverting
A. Machine Learning
B. Artificial Intelligence
C. Data Analytics
D. Large datasets
import numpy as np
arr = np.array([[10,20,30], [40,50,60]], dtype=np.int64)
print(len(arr))
A. 5
B. 2
C. 3
D. 1
A. Pandas
B. Numpy
C. SciPy
D. Scikit-learn
A. Npy
B. Rpy
C. NumPy
D. None of these
20.Match the output for the given code. 1 3 5 2 2.6.1
Part – B
(10 x 2 = 20 Marks)
Answer all the questions.
Q.No Questions Marks BL CO PO PI
21. Sketch the code to print the magic word Abracadabra, 7 times, using the 2 3 5 2 2.6.1
repeat character (*).
print("Abracadabra" * 7);
22. Add the print statements in the below code to print the one-line 2 3 5 3 2.6.1
docstring for add() method and the multi-line
docstring of power() method.
def add(a, b):
"""Return sum of given arguments."""
return a + b
def power(b, e):
"""Return the power value.
b -- is the base
e -- is the exponent
"""
return b ** e
# print docstring of add method
print(add.__doc__)
# print docstring of power method
print(power.__doc__)
23. Fill in the missing code as per the instructions given in comments 2 3 5 2 1.6.3
#in the below line, initialize a variable called length with
value 18
length=18
#in the below line, initialize a variable called snake with
text "King Cobra"
snake="King Cobra"
#Make no changes to the below line
print(snake, "can grow up to a length of", length, "feet")
24. Build the code to assign the integer 999, float 24.789 and string "Python 2 3 5 3 2.6.1
Interpreter" to three variables using multiple assignment and print them
individually.
value1, value2, value3=999,24.789,"Python
Interpreter"
print(value1)
print(value2)
print(value3)