Python Programming PYQ 2023-24 AKTU Question Paper

AKTU · BTECH · Semester 3 · Python Programming · Session 2023-24 · PYQ

AKTU Python Programming previous year question paper 2023-24 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

  1. Unit 1: Introduction to Python
  2. Unit 2: Program Flow Control
  3. Unit 3: Complex Data Types & Functions
  4. Unit 4: File Operations & Regular Expressions
  5. Unit 5: Packages, GUI & OOP

Questions in Python Programming AKTU PYQ 2023-24

  1. Q1a. Describe the concept of list comprehension with a suitable example (2 marks, 2023-24)
  2. Q1b. Differentiate between / and // operator with an example (2 marks, 2023-24)
  3. Q1c. Compute the output of the following python code: def count(s): for str in string.split(): s = “&”.join(str) return s print(count(“Python is fun to learn.”)) (2 marks, 2023-24)
  4. Q1d. How to use the functions defined in library.py in main.py (2 marks, 2023-24)
  5. Q1e. Describe the difference between linspace and argspace. (2 marks, 2023-24)
  6. Q1f. Explain why the program generates an error. x = [‘12’, ’hello’, 456] x[0] *= 3 x[1][1]=’bye’ (2 marks, 2023-24)
  7. Q1g. Describe about different functions of matplotlib and pandas. (2 marks, 2023-24)
  8. Q2a. Illustrate Unpacking tuples, mutable sequences, and string concatenation with examples (7 marks, 2023-24)
  9. Q2b. Illustrate different list slicing constructs for the following operations on the following list: L = [1, 2, 3, 4, 5, 6, 7, 8, 9] 1. Return a list of numbers starting from the last to second item of the list 2. Return a list that start from 3rd item to second last item. 3. Return a list that has… (7 marks, 2023-24)
  10. Q2c. Construct a function perfect_square(number) that returns a number if it is a perfect square otherwise it returns -1. For example: perfect_square(1) returns 1 perfect_square (2) returns -1 (7 marks, 2023-24)
  11. Q2d. Construct a program to change the contents of the file by reversing each character separated by comma: Hello!! Output H,e,l,l,o,!,! (7 marks, 2023-24)
  12. Q2e. Construct a plot for following dataset using matplotlib : (7 marks, 2023-24)
  13. Q3a. Determine a python function removenth(s,n) that takes an input a string and an integer n>=0 and removes a character at index n. If n is beyond the length of s, then whole s is returned. For example: removenth(“MANGO”,1) returns MNGO removenth(“MANGO”,3) returns MANO (7 marks, 2023-24)
  14. Q3b. Construct a program that accepts a comma separated sequence of words as input and prints the words in a comma-separated sequence after sorting them alphabetically. Suppose the following input is supplied to the program: without, hello, bag, world Then, the output should be: bag, hello, without,… (7 marks, 2023-24)
  15. Q4a. A website requires the users to input username and password to register. Construct a program to check the validity of password input by users. Following are the criteria for checking the password: 1. At least 1 letter between [a-z] 2. At least 1 number between [0-9] 3. At least 1 letter between… (7 marks, 2023-24)
  16. Q4b. Explore the working of while, and for loop with examples. (7 marks, 2023-24)
  17. Q5a. Construct a function ret smaller(l) that returns smallest list from a nested list. If two lists have same length then return the first list that is encountered. For example: ret smaller([ [ -2, -1, 0, 0.12, 1, 2], [3, 4, 5], [6 , 7, 8, 9, 10], [11, 12, 13, 14, 15]]) returns [3,4,5] ret smaller([ [… (7 marks, 2023-24)
  18. Q5b. Construct following filters: 1. Filter all the numbers 2. Filter all the strings starting with a vowel 3. Filter all the strings that contains any of the following noun: Agra, Ramesh, Tomato, Patna. Create a program that implements these filters to clean the text. (7 marks, 2023-24)
  19. Q6a. Change all the numbers in the file to text. Construct a program for the same. Example: Given 2 integer numbers, return their product only if the product is equal to or lower than 10. And the result should be: Given two integer numbers, return their product only if the product is equal to or lower… (7 marks, 2023-24)
  20. Q6b. Construct a program which accepts a sequence of words separated by whitespace as file input. Print the words composed of digits only. (7 marks, 2023-24)
  21. Q7a. Construct a program to read cities.csv dataset, remove last column and save it in an array. Save the last column to another array. Plot the first two columns. (7 marks, 2023-24)
  22. Q7b. Design a calculator with the following buttons and functionalities like addition, subtraction, multiplication, division and clear. (7 marks, 2023-24)

AKTU paper codes: BCC302, BCC402, BCC302H, BCC402H, KNC302, KNC402

Python Programming previous year papers

More Python Programming resources

Browse all notes · Semester 3 notes