B.TechSemester 32022-23Python ProgrammingKNC-302

Python Programming (KNC-302) - AKTU Question Paper 2022-23

B.Tech · Semester 3 · Free PDF Download

This is the official AKTU Python Programming Previous Year Question Paper for B.Tech Semester 3, academic session 2022-23. Published by Dr. A.P.J. Abdul Kalam Technical University (AKTU/UPTU), Lucknow. Free PDF download — no login required.

Course:B.Tech
Semester:Semester 3
Session:2022-23
University:AKTU / UPTU

Rate this paper

Questions Asked in 2022-23

Python Programming (KNC-302) — complete question paper

Section AAttempt all questions in brief. 1x10 = 10
  • a
    Explain the Programming Cycle for Python in detail
  • b
    Describe the concept of List Slicing with a suitable example
  • c
    Show the way to import the module in python
  • d
    Differentiate between Python Arrays and lists?
  • e
    Define floor divis ion with an example
  • f
    Explain the difference betwee n 'append' and 'extend' in Python?
  • g
    What is a dictionary in Python?
  • h
    What is object-oriented progr amming (OOP) in Python? Give an example. (i) What will be the output of the following python code def count1(s): vowels = "AEIOUaeiou" count = 0 for c in s: if c in vowels: count += 1 return count print(count1(‘I love India’)) (j) What will be the outpu t of the following code? list1 = ['M', 'o', 'n', 'k', 'y'] print("@".join(list1))
Section BAttempt any three of the following: 5x3 = 15
  • a
    Demonstrate five d ifferent built in functions used in the s tring. Write a program to check whether a string is a palindrome or not
  • b
    Explain the following loops with a flow diagram, syntax, an d suitable examples. I) For II) while
  • c
    Explain the continue, break , and pass statements with a suitable example
  • d
    Develop a program to calculat e the reverse of any entered number
  • e
    Explain the list Comprehen sion with any suitable example
Section CAttempt any one part of the following: 5x1 = 5
  • a
    Illustrate Unpacking Sequences, Mutable Sequences, and List comprehension with examples
  • b
    Explain the lambda function. How it is helpful in the highe r order function. Explain map() function with a suitable example
  • a
    Discuss the different types o f argument-passing methods in python. Explain the variable length argument with any suitable example
  • b
    Write short notes on the following with a suitable example I) Encapsulation II) Inheritance
  • a
    Demonstrate the fi le handling procedure in detail. Write a python code to create a file with ‘P.txt’ name and write your name and father’ s name in this file and then read this file to print it
  • b
    Demonstrate the ‘Sieve of Er atosthenes’ theorem and write t he python function to print prime numbers between 1 to 100
  • a
    Develop and write the python code of selection sort to sort 41,65,43,91,12,14,62 elements. Also, explain its complexity
  • b
    Explain Binary search with its python code and complexity
  • a
    Explain the importance of Ex ception handling in any object- oriented programming language. Explain try exceptions and finally block with any suitable example
  • b
    Summarize the ‘Tower of Hanoi’ puzzle and write its recursi ve function to implement it

Question text is extracted from the official AKTU question paper PDF above. Hindi translations are omitted — every question is printed in English in the original paper. Last verified: 2026-08-23.

Repeated Questions — KNC-302

Questions that appeared in more than one session, found by comparing 2 years of Python Programming papers (2021-22, 2022-23)

2x

Explain the Programming Cycle for Python in detail

Appeared in: 2021-22 · 2022-23

2x

Show the way to import the module in python

Appeared in: 2021-22 · 2022-23

Syllabus & More PYQs

Paper solve karne se pehle unit-wise syllabus dekh lo