B.TechSemester 42021-22Python ProgrammingKNC402

Python Programming (KNC402) - AKTU Question Paper 2021-22

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 2021-22. 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:2021-22
University:AKTU / UPTU

Rate this paper

Questions Asked in 2021-22

Python Programming (KNC402) — complete question paper

Section AAttempt all q u e s t i o n s i n b r i e f . 2.5*4 = 10
  • a
    Discuss why Python is called as dynamic and strongly typed language? 1
  • b
    How pass statement is different from a comment? 2
  • c
    Write a for loop that prints numbers from 0 to 57, using range function. 2
  • d
    What is the difference between Python Arrays and Lists? 3
Section B
  • a
    Write a python function named ComputeAverage to find averag e of a list of numbers. It should handle the exception if the list is empty an d return 0 in that case
  • b
    Implement the binary search technique. 5
  • c
    Explain the use of break and continue with a suitable examp le. 2
Section CAttempt any two p a r t o f t h e f o l l o w i n g : 4*2 = 8
  • a
    What do you mean by operator precedence and associativity. Explain. 1
  • b
    Write short notes on i. The programming cycle for python ii. Type conversion in python
  • c
    Write Python program to swap two numbers without using Intermediate/Temporary variables. Prompt the user for input
  • a
    Write a program to check an input number is prime or not. 2
  • b
    Write a program that accepts a sentence and calculate the n umber of digits, uppercase and lowercase letters
  • c
    Write a program to check an input year is leap year or not. 2 Qno Questions CO
  • a
    There is a file named Input.Txt. Enter some positive number s into the file named Input.Txt. Read the contents of the file and if it is an odd number write it to ODD.TXT and if the number is even, write it to EVEN.TXT
  • b
    Discuss Exceptions and Assertions in Python. Explain with a suitable example. Explain any two built-in exceptions
  • c
    What is the significance of module in Python? What are the methods of importing a module? Explain with suitable example
  • a
    What do you mean by recursion? Write a recursive function t o compute the factorial of an input number N
  • b
    Implement selection sort using Python 5
  • c
    What are different types of inheritance supported by Python? Explain. 4

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