Papers / AKTU / B.Tech / Python Programming
AKTU · B.Tech · 3rd semester

AKTU Python Programming (KNC302) Question Paper 2022-23

UniversityDr. A.P.J. Abdul Kalam Technical University (AKTU), Lucknow
CourseB.Tech, Semester III
SubjectPython Programming (KNC302)
ExamTheory Examination 2022-23 (odd semester)
Time · Marks3 hours · 50 marks
SourceAKTU question paper, from the ABESIT question paper bank
View original PDF Other years

Note: Attempt all Sections. If you require any missing data, then choose suitably.

Section A

Q1. Attempt all questions in brief · 1 × 10 = 10 marks

  1. Explain the Programming Cycle for Python in detail.
  2. Describe the concept of List Slicing with a suitable example.
  3. Show the way to import the module in python.
  4. Differentiate between Python Arrays and lists?
  5. Define floor division with an example.
  6. Explain the difference between 'append' and 'extend' in Python?
  7. What is a dictionary in Python?
  8. What is object-oriented programming (OOP) in Python? Give an example.
  9. 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’))
  10. What will be the output of the following code?
    list1 = ['M', 'o', 'n', 'k', 'y']
    print("@".join(list1))

Section B

Q2. Attempt any three of the following · 5 × 3 = 15 marks

  1. Demonstrate five different built in functions used in the string. Write a program to check whether a string is a palindrome or not.
  2. Explain the following loops with a flow diagram, syntax, and suitable examples. I) For II) while
  3. Explain the continue, break, and pass statements with a suitable example.
  4. Develop a program to calculate the reverse of any entered number.
  5. Explain the list Comprehension with any suitable example.

Section C

Q3

Attempt any one part of the following · 5 × 1 = 5 marks

  1. Illustrate Unpacking Sequences, Mutable Sequences, and List comprehension with examples.
  2. Explain the lambda function. How it is helpful in the higher order function. Explain map() function with a suitable example.

Q4

Attempt any one part of the following · 5 × 1 = 5 marks

  1. Discuss the different types of argument-passing methods in python. Explain the variable length argument with any suitable example.
  2. Write short notes on the following with a suitable example I) Encapsulation II) Inheritance

Q5

Attempt any one part of the following · 5 × 1 = 5 marks

  1. Demonstrate the file 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.
  2. Demonstrate the ‘Sieve of Eratosthenes’ theorem and write the python function to print prime numbers between 1 to 100.

Q6

Attempt any one part of the following · 5 × 1 = 5 marks

  1. Develop and write the python code of selection sort to sort 41,65,43,91,12,14,62 elements. Also, explain its complexity.
  2. Explain Binary search with its python code and complexity.

Q7

Attempt any one part of the following · 5 × 1 = 5 marks

  1. Explain the importance of Exception handling in any object-oriented programming language. Explain try exceptions and finally block with any suitable example.
  2. Summarize the ‘Tower of Hanoi’ puzzle and write its recursive function to implement it.

Other years

More AKTU Python Programming papers on LearnAIFast.

This paper is reproduced for study purposes only. Copyright belongs to AKTU. Source: the question paper bank of ABES Institute of Technology, an AKTU-affiliated college. If you own the copyright and want it removed, email learnwithskillnest@gmail.com and we will take it down.