This document is the B.Tech (Semester III) Theory Examination 2020–2021 question paper for the subject Python Programming (KNC302) under Dr. A.P.J. Abdul Kalam Technical University (AKTU).
The exam duration is 3 hours, and the total marks are 100.
The uploaded paper contains 3 sections only: Section A, Section B, Section C, with further subdivisions inside Section C (Q3–Q7).
The paper spans 4 printed pages, all clearly structured with questions, marks, CO mapping, and Python code snippets.
SECTION A — 10 Short Questions (10 × 2 = 20 Marks)
As shown on Page 1, this section contains ten brief questions, each for 2 marks.
The questions check fundamental Python concepts:
Use of the raise statement
Writing a recursive reverse-print function
Behavior of range(s, e)
Use of the with statement (context managers)
Identifying incorrect multiple assignment statements
Operator precedence
Reading integer input from the user
Error due to string immutability in nested indexing
Output of a lambda expression
Use of the __lt__() function in Python classes
Every question is conceptual and designed to test Python basics.
SECTION B — Long Answer Questions (Any 3 × 10 = 30 Marks)
Section B appears on Page 2.
Students must attempt any three of the five 10-mark questions.
Topics include:
Writing a function removekth(s, k)
Computing average of list elements using try–except for empty list
Difference between linear search and binary search
Filtering values using list comprehension
Program to find all positive factors of a number
These questions require coding, explanation, and understanding of Python error handling, algorithms, and list operations.
SECTION C — Advanced / Applied Python Questions (Q3 to Q7, Each 10 Marks)
Section C appears across pages 2, 3, and 4.
Each question has two alternative parts, and the student must attempt one from each Q-number.
Q3 — Python Modules & Import System
(Shown on Page 2)
Creating a Python file that works both as a module and a standalone script
OR
Difference between
import library
from library import *
Q4 — Lists, Functions, Arguments
(Page 3)
Writing makePairs to pair elements from two lists
OR
Example using both keyword and default arguments in one function call
Q5 — Interpreter Concept & Short-Circuiting
(Page 3)
Why Python is called an interpreted language
OR
Short-circuit evaluation with program output for c or a
Q6 — Looping, Patterns, Number Theory
(Page 4)
Writing the triangle(N) pattern-printing program
OR
countSquares(N) to count perfect squares ≤ N
Q7 — Sequence Analysis & Searching
(Page 4)
alternating(lst) to check alternating even-odd pattern
OR
searchMany(s, x, k) to verify max. k occurrences of a value
OVERALL DESCRIPTION OF THE DOCUMENT
The uploaded question paper thoroughly evaluates:
Python syntax fundamentals
Functions, recursion, arguments
Exception handling
List operations, list comprehension
Searching algorithms
Lambda expressions
Pattern printing
Counting and logical conditions
Import mechanisms & Python script structure
Control flow (short-circuiting)
Using Python for mathematical and logical problems
The three-section structure includes:
Section A: 20 marks → Conceptual short answers
Section B: 30 marks → Programming-based descriptive questions
Section C: 50 marks → Advanced Python coding, logic, and reasoning
All pages include neat tabular formatting and Python code snippets, ensuring clarity and comprehensive coverage of Python fundamentals and intermediate-level programming.