0% found this document useful (0 votes)
30 views5 pages

ACSE0101

This document contains instructions and questions for a Python programming exam. It is divided into 3 sections - Section A contains 10 multiple choice questions, Section B contains 5 short answer questions, and Section C contains 2 long answer questions. Students are instructed to attempt all questions in the allotted 3 hours and write their answers in a sequential order, leaving no sheets blank. The questions cover different Python concepts like data types, operators, functions, exceptions, OOP concepts, and algorithms.

Uploaded by

lebanonmj789
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views5 pages

ACSE0101

This document contains instructions and questions for a Python programming exam. It is divided into 3 sections - Section A contains 10 multiple choice questions, Section B contains 5 short answer questions, and Section C contains 2 long answer questions. Students are instructed to attempt all questions in the allotted 3 hours and write their answers in a sequential order, leaving no sheets blank. The questions cover different Python concepts like data types, operators, functions, exceptions, OOP concepts, and algorithms.

Uploaded by

lebanonmj789
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

.

Printed Page:- Subject Code:- ACSE0101


Roll. No:

NOIDA INSTITUTE OF ENGINEERING AND TECHNOLOGY, GREATER NOIDA


(An Autonomous Institute Affiliated to AKTU, Lucknow)
B.Tech
SEM: I - CARRY OVER THEORY EXAMINATION - AUGUST 2023
Subject: Problem Solving using Python
Time: 3 Hours Max. Marks: 100
General Instructions:
IMP: Verify that you have received the question paper with the correct course, code, branch etc.
1. This Question paper comprises of three Sections -A, B, & C. It consists of Multiple Choice
Questions (MCQ’s) & Subjective type questions.
2. Maximum marks for each question are indicated on right -hand side of each question.
3. Illustrate your answers with neat sketches wherever necessary.
4. Assume suitable data if necessary.
u n
5. Preferably, write the answers in sequential order.

_ 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

1-b. The binary system uses powers of. [CO1] 1

(a) 2
(b) 10
(c) 8
(d) 16

1-c. What is the value of s[4 :1 :-1]. [CO2] 1


Where s="Python"

(a) pyt

.
Page 1 of 5
.
(b) hon
(c) yth
(d) oht

1-d. A variable can be removed by using which keyword. [CO2] 1

(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]

(a) Reducing duplication of code


1

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]

(a) [4, 8, 12, 5, 10, 15, 6, 12, 18]


(b) [4, 10, 18]
(c) [4, 5, 6, 8, 10, 12, 12, 15, 18]
(d) [18, 12, 6, 15, 10, 5, 12, 8, 4]

.
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]

1-i. If no exception occurs, then_________block is skipped. [CO5]

(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]

Print series 1,2,3,4,6,7,8,10 using continue. [CO2]


2

2.c. What is the use of the return statement. [CO3] 2

2.d. Write a python program to find length of word in a string . [CO4] 2

2.e. When “NameError” Occurs in python program? Give example. (CO5) 2

SECTION B 30

3. Answer any five of the following:-

3-a. Define an algorithm. How it is useful in the context of software development? 6


[CO1]

3-b. Differentiate among Assembler, Compiler and Interpreter. [CO1] 6


.
Page 3 of 5
.
3-c. Write a program to determine whether a digit, uppercase or lower case is 6
entered.[CO2]

3-d. Write a Python Programs to print following patterns: [CO2] 6


A
BC
DEF
GHIJ
KLMNO

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

4. Answer any one of the following:-

_ 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. Answer any one of the following:-

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. Answer any one of the following:-

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. Answer any one of the following:-

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

You might also like