B.TechSemester 32024-25Python ProgrammingBCC302

Python Programming (BCC302) - AKTU Question Paper 2024-25

B.Tech · Semester 3 · Free PDF Download

This is the official AKTU Python Programming Previous Year Question Paper for B.Tech Semester 3, academic session 2024-25. Published by Dr. A.P.J. Abdul Kalam Technical University (AKTU/UPTU), Lucknow. Free PDF download — no login required.

Course:B.Tech
Semester:Semester 3
Session:2024-25
University:AKTU / UPTU

Rate this paper

Questions Asked in 2024-25

Python Programming (BCC302) — complete question paper · 70 marks · 3 Hours

Section AAttempt all questions in brief. 2 x 07 = 14
  • a
    State how to handle exceptions in Python? Provide a simple example
  • b
    What will be the output of the following Python co de? def compute(x): return [i**2 for i in x if i%2==0] print(compute([1, 2, 3, 4, 5])) def compute(x): return [i**2 for i in x if i%2==0] print(compute([1, 2, 3, 4, 5]))
  • c
    Explain floor division with an example
  • d
    Describe the purpose of the ‘with’ statement in fi le handling?
  • e
    Briefly describe the use of lambda functions in Py thon
  • f
    Demonstrate how to assign a single value to a tupl e
  • g
    Explain why numpy is used instead of python arrays for mathematical calculations?
Section BAttempt any three of the following: 07 x 3 = 21
  • a
    Design a basic calculator in Python that support s addition, subtraction, multiplication, division
  • b
    Define Membership and Identity Operators. Given
  • b
    = 3 Distinguish between: (a is b) and (a = = b) ?
  • c
    Write a Python function to count the frequency o f each character in a
    given string and return the output in a dictionary.  Example:
    char_frequency("HELLO") returns {"H":1, "E":1, "L":2, "O":1}
    "O":1}
  • d
    Write a program to reverse the contents of a fil e character by character, separating each character with a comma
  • e
    Create a pie chart using matplotlib to represent the following data: Languages Popularity Python 30 Java 25 JavaScript 15 Ruby 10
Section CAttempt any one part of the following: 07 x 1 = 07
  • a
    Write short notes on the following with examples
  • a
    + (Operator Precedence)
  • c
    +A2 (Type Conversion)
  • b
    Write a program to validate email addresses usin g regular expressions. Criteria
  • 1
    Must contain @ symbol
  • 2
    Must contain domain name
  • 3
    Should not have spaces
  • a
    Write a program to create a hollow pyramid patte rn given below
  • b
    Explain the why loops are needed and the types o f loops in python. Discuss break and continue with example
  • a
    Write a function to find the longest word in a g iven list of words. Example: longest_word([‘apple’, ‘banana’, ‘cherry’]) returns ‘banana’
  • b
    Distinguish between a Tuple and a List with exam ples. Explain with examples atleast 4 built-in methods of Dictionary
  • a
    Discuss different types of file modes in Python? Explain with examples
  • b
    Write a program to read a CSV file and display t he rows where a specific column value exceeds a given threshold
  • a
    Discuss the role of event handling in Tkinter. H ow can you bind events to widgets? Provide examples
  • b
    Write a program to read data from a CSV file 'st udents.csv', calculate the average marks for each student, and display the results

Question text is extracted from the official AKTU question paper PDF above. Hindi translations are omitted — every question is printed in English in the original paper. Last verified: 2026-08-23.

Syllabus & More PYQs

Paper solve karne se pehle unit-wise syllabus dekh lo