AKTU Python Programming (KNC302) Question Paper 2022-23
| University | Dr. A.P.J. Abdul Kalam Technical University (AKTU), Lucknow |
|---|---|
| Course | B.Tech, Semester III |
| Subject | Python Programming (KNC302) |
| Exam | Theory Examination 2022-23 (odd semester) |
| Time · Marks | 3 hours · 50 marks |
| Source | AKTU question paper, from the ABESIT question paper bank |
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
- Explain the Programming Cycle for Python in detail.
- Describe the concept of List Slicing with a suitable example.
- Show the way to import the module in python.
- Differentiate between Python Arrays and lists?
- Define floor division with an example.
- Explain the difference between 'append' and 'extend' in Python?
- What is a dictionary in Python?
- What is object-oriented programming (OOP) in Python? Give an example.
- What will be the output of the following python code
def count1(s):vowels = "AEIOUaeiou"count = 0for c in s:if c in vowels:count += 1return countprint(count1(‘I love India’)) - 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
- Demonstrate five different built in functions used in the string. Write a program to check whether a string is a palindrome or not.
- Explain the following loops with a flow diagram, syntax, and suitable examples. I) For II) while
- Explain the continue, break, and pass statements with a suitable example.
- Develop a program to calculate the reverse of any entered number.
- Explain the list Comprehension with any suitable example.
Section C
Q3
Attempt any one part of the following · 5 × 1 = 5 marks
- Illustrate Unpacking Sequences, Mutable Sequences, and List comprehension with examples.
- 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
- Discuss the different types of argument-passing methods in python. Explain the variable length argument with any suitable example.
- 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
- 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.
- 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
- Develop and write the python code of selection sort to sort 41,65,43,91,12,14,62 elements. Also, explain its complexity.
- Explain Binary search with its python code and complexity.
Q7
Attempt any one part of the following · 5 × 1 = 5 marks
- Explain the importance of Exception handling in any object-oriented programming language. Explain try exceptions and finally block with any suitable example.
- Summarize the ‘Tower of Hanoi’ puzzle and write its recursive function to implement it.
Short on time? See the most repeated AKTU Python Programming questions across all years.
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.