B.TechSemester 42022-23Python ProgrammingKNC-402

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

B.Tech · Semester 4 · Free PDF Download

This is the official AKTU Python Programming Previous Year Question Paper for B.Tech Semester 4, 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 4
Session:2022-23
University:AKTU / UPTU

Rate this paper

Questions Asked in 2022-23

Python Programming (KNC-402) — complete question paper

Section AAttempt all questions in brief. 2 x 10 = 20
  • a
    Define the programming cycle for Python
  • b
    Describe the use of class `__init__()` method
  • c
    Explain features of any two Python IDEs
  • d
    Discuss the purpose of the break and continue stat ement in loops
  • e
    Explain mutable sequences in Python
  • f
    Explain the output of following function. defprintalpha (abc_list, num_list): for char in abc_list: for num in num_list: print(char, num) return printalpha (['a', 'b', 'c'], [1, 2, 3])
  • g
    Discuss the special methods __le__ and __ne__
  • h
    Discuss various file opening modes of python. i. Compare assert, try -except and raise statements. j. Write python function to perform linear search
Section BAttempt any three of the following: 10x3=30
  • a
    Write Python code snippet to display n terms of Fibonacci series using recursion
  • b
    Write and e xplain an algorithm through python code to generate prime numbers
  • c
    Compare list and tuple data structure with suitable example s. Explain the concept of list comprehension
  • d
    Explain the python implementation of stack ADT
  • e
    Describe python program to implement selection s ort. Simulate your code on the following data
Section CAttempt any one part of the following: 10x1=10
  • a
    Discuss various categories of operators in python. Find and explain stepwise solution of following expressions if a=3, b=5, c=10
  • b
    Discuss why python is interpreted language. Expl ain history and features of python while comparing python version 2 and 3
  • a
    Write a python program to count the vowels present in given input string. Explain the output of program through example
  • b
    Write a program that accepts sequence of lines as i n put and prints the lines after making all characters in the sentence capitalized. e.g. If Input: Hello world Practice makes perfect Then, Output: HELLO WORLD PRACTICE MAKES PERFECT
  • a
    Discuss list data structure of python. Explain v arious inbuilt methods of list with suitable example of each
  • b
    Compare list and dictionary data structure. Expl ain various dictionary methods with suitable examples of each
  • a
    Discuss the concept of Iterators in python . Explain , how we can create text file in python? Describe python program to write the num ber of letters and digits in given input string into a File object
  • b
    Illustrate through examples, how we can implemen t different type of inheritance in python? Explain the static, instance and class method through suitable example
  • a
    Explain the Tower of Hanoi problem and its recur sive solution in Python
  • b
    Write python program to implement merge sort alg orithm. Discuss, how we can compare the time complexity of two algorithms?

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.

Syllabus & More PYQs

Paper solve karne se pehle unit-wise syllabus dekh lo