Python Programming PYQ 2021-22 AKTU Question Paper
AKTU · BTECH · Semester 3 · Python Programming · Session 2021-22 · PYQ
AKTU Python Programming previous year question paper 2021-22 for B.Tech Semester 3. Covers Introduction to Python, Program Flow Control, Complex Data Types…
Open the interactive reader to study this resource on AcademicArk.
Python Programming AKTU syllabus
- Unit 1: Introduction to Python
- Unit 2: Program Flow Control
- Unit 3: Complex Data Types & Functions
- Unit 4: File Operations & Regular Expressions
- Unit 5: Packages, GUI & OOP
Questions in Python Programming AKTU PYQ 2021-22
- Q1a. Explain the Programming Cycle for Python in detail. (2 marks, 2021-22)
- Q1a. Discuss why Python is called as dynamic and strongly typed language? (2.5 marks, 2021-22)
- Q1b. What will be the output of the following Python code? i = 0 while i< 3: print(i) i += 1 else: print(0) (2 marks, 2021-22)
- Q1b. How pass statement is different from a comment? (2.5 marks, 2021-22)
- Q1c. What will be the output of the following Python code? def cube(x): return x * x * x x = cube(3) print x (2 marks, 2021-22)
- Q1c. Write a for loop that prints numbers from 0 to 57, using range function. (2.5 marks, 2021-22)
- Q1d. How do we define an Interface for an ADT? (2 marks, 2021-22)
- Q1d. What is the difference between Python Arrays and Lists? (2.5 marks, 2021-22)
- Q1e. How do you perform a search in Python? (2 marks, 2021-22)
- Q2a. What do you mean by Python IDE? Explain in detail. (5 marks, 2021-22)
- Q2a. 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. (4 marks, 2021-22)
- Q2b. How can you randomize the items of a list in place in Python? (5 marks, 2021-22)
- Q2b. Implement the binary search technique. (4 marks, 2021-22)
- Q2c. Explain Tuples and Unpacking Sequences in Python Data Structure. (5 marks, 2021-22)
- Q2c. Explain the use of break and continue with a suitable example. (4 marks, 2021-22)
- Q2d. What are File input and output operations in Python Programming? (5 marks, 2021-22)
- Q2e. Solve the Tower of Hanoi problem for n= 3 disk and show all the steps. (5 marks, 2021-22)
- Q3a. Write a program in Python to execute the Selection sort algorithm. (5 marks, 2021-22)
- Q3a. What do you mean by operator precedence and associativity. Explain. (4 marks, 2021-22)
- Q3b. Explain why python is considered an interpreted language. (5 marks, 2021-22)
- Q3b. Write short notes on i. The programming cycle for python ii. Type conversion in python (4 marks, 2021-22)
- Q3c. Write Python program to swap two numbers without using Intermediate/Temporary variables. Prompt the user for input. (4 marks, 2021-22)
- Q4a. Write a Python program to construct the following pattern, using a nested for loop. * * * * * * * * * * * * * * * * * * * * * * * * * (5 marks, 2021-22)
- Q4a. Write a program to check an input number is prime or not. (4 marks, 2021-22)
- Q4b. Write a program to produce Fibonacci series in Python. (5 marks, 2021-22)
- Q4b. Write a program that accepts a sentence and calculate the number of digits, uppercase and lowercase letters. (4 marks, 2021-22)
- Q4c. Write a program to check an input year is leap year or not. (4 marks, 2021-22)
- Q5a. Write a Python program to change a given string to a new string where the first and last chars have been exchanged. (5 marks, 2021-22)
- Q5a. 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 (4 marks, 2021-22)
- Q5b. Write a Python program to add an item in a tuple. (5 marks, 2021-22)
- Q5b. Discuss Exceptions and Assertions in Python. Explain with a suitable example. Explain any two built-in exceptions. (4 marks, 2021-22)
- Q5c. What is the significance of module in Python? What are the methods of importing a module? Explain with suitable example (4 marks, 2021-22)
- Q6a. How to create and import a module in Python? (5 marks, 2021-22)
- Q6a. What do you mean by recursion? Write a recursive function to compute the factorial of an input number N. (4 marks, 2021-22)
- Q6b. Explain the algorithm Sieve of Eratosthene used in Python Programming. (5 marks, 2021-22)
- Q6b. Implement selection sort using Python (4 marks, 2021-22)
- Q6c. What are different types of inheritance supported by Python? Explain. (4 marks, 2021-22)
- Q7a. Write a Recursive function in python BinarySearch(Arr,l,R,X) to search the given element X to be searched from the List Arr having R elements, where l represent slower bound and R represents the upper bound. (5 marks, 2021-22)
- Q7b. Explain the terms Merge List and Merge Sort in Python Programming. (5 marks, 2021-22)
AKTU paper codes: BCC302, BCC402, BCC302H, BCC402H, KNC302, KNC402
Python Programming previous year papers
More Python Programming resources
More versions of this resource
Browse all notes · Semester 3 notes