AKTU Python Programming (KNC402) Question Paper 2022-23
| University | Dr. A.P.J. Abdul Kalam Technical University (AKTU), Lucknow |
|---|---|
| Course | B.Tech, Semester IV |
| Subject | Python Programming (KNC402) |
| Exam | Theory Examination 2022-23 (even semester) |
| Time · Marks | 3 hours · 100 marks |
| Source | AKTU question paper, from the ABESIT question paper bank |
Note: Attempt all Sections. If require any missing data; then choose suitably.
Section A
Q1. Attempt all questions in brief · 2 × 10 = 20 marks
- Define the programming cycle for Python .
- Describe the use of class `__init__()` method .
- Explain features of any two Python IDEs.
- Discuss the purpose of the break and continue statement in loops.
- Explain mutable sequences in Python .
- Explain the output of following function. defprintalpha (abc_list, num_list):
for char in abc_list:for num in num_list:print(char, num)returnprintalpha (['a', 'b', 'c'], [1, 2, 3]) - Discuss the special methods __le__ and __ne__.
- Discuss various file opening modes of python.
- Compare assert, try - except and raise statements.
- Write python function to perform linear search.
Section B
Q2. Attempt any three of the following · 10 × 3 = 30 marks
- Write Python code snippet to display n terms of Fibonacci series using recursion.
- Write and e xplain an algorithm through python code to generate prime numbers .
- Compare list and tuple data structure with suitable example s . Explain the concept of list comprehension.
- Explain the python implementation of stack ADT.
- Describe python program to implement selection sort. Simulate your code on the following data 2,52,1,5,2,54,62,64.
Section C
Q3
Attempt any one part of the following · 10 × 1 = 10 marks
- Discuss various categories of operators in python. Find and explain stepwise
solution of following expressions if a=3, b=5, c=10.i) a &b<<2//5**2+c^bii) b>>a**2<<2 >> b**2^c**3 - Discuss why python is interpreted language. Explain history and features of python while comparing python version 2 and 3.
Q4
Attempt any one part of the following · 10 × 1 = 10 marks
- Write a python program to count the vowels present in given input string. Explain the output of program through example.
- Write a program that accepts sequence of lines as in put and prints the lines after making all characters in the sentence capitalized. e.g. If Input:
Hello worldPractice makes perfect
Then, Output:HELLO WORLDPRACTICE MAKES PERFECT
Q5
Attempt any one part of the following · 10 × 1 = 10 marks
- Discuss list data structure of python. Explain various inbuilt methods of list with suitable example of each.
- Compare list and dictionary data structure. Explain various dictionary methods with suitable examples of each.
Q6
Attempt any one part of the following · 10 × 1 = 10 marks
- Discuss the concept of Iterators in python . Explain , how we can create text file in python? Describe python program to write the number of letters and digits in given input string into a File object.
- Illustrate through examples, how we can implement different type of inheritance in python? Explain the static, instance and class method through suitable example.
Q7
Attempt any one part of the following · 10 × 1 = 10 marks
- Explain the Tower of Hanoi problem and its recursive solution in Python.
- Write python program to implement merge sort algorithm. Discuss, how we can compare the time complexity of two algorithms?
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.