AKTU Python Programming (KNC402) Question Paper 2021-22
| University | Dr. A.P.J. Abdul Kalam Technical University (AKTU), Lucknow |
|---|---|
| Course | B.Tech, Semester IV |
| Subject | Python Programming (KNC402) |
| Exam | Theory Examination 2021-22 (even 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. 2 · 5 × 4 = 10 marks
- Discuss why Python is called as dynamic and strongly typed language?
- How pass statement is different from a comment?
- Write a for loop that prints numbers from 0 to 57, using range function.
- What is the difference between Python Arrays and Lists?
Section B
Q2. Attempt any two of the following · 4 × 2 = 8 marks
- Write a python function named ComputeAverage to find average of a list of numbers. It should handle the exception if the list is empty and return 0 in that case.
- Implement the binary search technique.
- Explain the use of break and continue with a suitable example.
Section C
Q3
Attempt any two part of the following · 4 × 2 = 8 marks
- What do you mean by operator precedence and associativity. Explain.
- Write short notes on i. The programming cycle for python ii. Type conversion in python
- Write Python program to swap two numbers without using Intermediate/Temporary variables. Prompt the user for input.
Q4
Attempt any two part of the following · 4 × 2 = 8 marks
- Write a program to check an input number is prime or not.
- Write a program that accepts a sentence and calculate the number of digits, 2 uppercase and lowercase letters.
- Write a program to check an input year is leap year or not.
Q5
Attempt any two part of the following · 4 × 2 = 8 marks
- There is a file named Input.Txt. Enter some positive numbers 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
- Discuss Exceptions and Assertions in Python. Explain with a suitable example. Explain any two built-in exceptions.
- What is the significance of module in Python? What are the methods of importing a module? Explain with suitable example
Q6
Attempt any two part of the following · 4 × 2 = 8 marks
- What do you mean by recursion? Write a recursive function to compute the factorial of an input number N.
- Implement selection sort using Python
- What are different types of inheritance supported by Python? Explain.
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.