ACSE0101
ACSE0101
_ J
6. No sheet should be left blank. Any written material after a blank sheet will not be
evaluated/checked.
a n
1. Attempt all parts:-
SECTION A
3 J 20
1-a.
- 2
Which of the following is a structured programming technique that graphically
represents the detailed steps required to solve a program? [CO1]
1
2
(a) Object-oriented programming
2
2 0
(b) Pseudocode
(c) Flowchart
(d) Top-down design
(a) 2
(b) 10
(c) 8
(d) 16
(a) pyt
.
Page 1 of 5
.
(b) hon
(c) yth
(d) oht
(a) remove
(b) clear
(c) del
(d) delete
1-e. What will be the output of the following Python code? [CO3] 1
def printMax(a, b):
if a > b:
print(a, 'is maximum')
elif a == b:
print(a, 'is equal to', b)
u n
else:
print(b, 'is maximum')
_ J
printMax(3, 4)
(a) 3
a n
(b) 4
(c) 4 is maximum
3 J
(d) 3 is maximum
- 2
1-f.
2 2
Which are the advantages of functions in python? [CO3]
2 0
(b) Decomposing complex problems into simpler pieces
(c) Improving clarity of the code
(d) All of the mentioned
1-g. What will be the output of the following Python Code? [CO4] 1
L1=[1,2,3]
L2=[4,5,6]
[x*y for x in L1 for y in L2]
.
Page 2 of 5
.
1-h. What will be the output of the following Python Code? [CO4] 1
L1=[2,4,6]
L2=[-2,-4,-6]
for i in zip(L1, L2):
print(i)
(a) 2,-2
4.-4
6,-6
(b) [(2, -2), (4, -4), (6, -6)]
(c) (2,-2)
(4.-4)
(6,-6)
(d) [-4, -16, -36]
(a) try
u n 1
(b) except
_ J
(c) else
(d) finally
a n
1-j.
(a) try
3 J
Which block will be executed always in exception handling. [CO5] 1
(b) except
- 2
(c) finally
(d) else
2 2
2. Attempt all parts:-
2.a.
2.b.
2 0
Define operators in python. [CO1]
SECTION B 30
3.e. Write a function that takes a number as a parameter and check the number is 6
prime or not.
3.f. Differentiate between the following methods of list using example: [CO4] 6
a) append() and extend()
b) pop() and remove()
3.g.
SECTION C
u n
Describe different types of errors in programming language. [CO5] 6
50
_ J
4-a.
a n
Draw a flow chart and write algorithms to find sum of cubes of all digits of a
number. Also write down all symbols used in flow chart with their
10
4-b.
purpose.[CO1]
3 J
Write a python program to illustrate all Bitwise operators. Also, show the 10
expected output.[CO1]
-
5. Answer any one of the following:- 2
5-a.
2
What is palindrome number?Write a Python Program to check if a number is
2
10
0
Palindrome or not.(Without using function) [CO2]
5-b.
*
***
2
Write a Python Programs to print following patterns: [CO2] 10
*****
*******
*****
***
*
6-a. Explain recursion. Write a program to reverse a string using recursion. (CO3) 10
6-b. What are packages? Give an example of package creation in Python. Write a 10
.
Page 4 of 5
.
small code to illustrate the use of package in Python. (CO3)
7-a. Explain the slicing,indexing and concatenation operation in list with example. 10
[CO4]
7-b. Differentiate between the following methods of set using example: [CO4] 10
a) difference() and difference_update()
b) union() and update()
8-a. Describe the mutilple exceptions in python with a suitable example. Explain the 10
role of else and finally block in exception handling. [CO5]
8-b. Discuss Exceptions and Assertions in python. How to handle Exceptions with 10
Try-Except? Explain 5 Built-in Exceptions with example. [CO5]
u n
_ J
a n
3 J
- 2
2 2
2 0
.
Page 5 of 5