PYQ – PYTHON PROGRAMMING (2418305) | SEMESTER 3RD (2ND YEAR) | Year 2025

Share:WhatsAppTelegram
Question 1

Python Programming 2025 NEW PYQ.


Group A

 

Choose the most suitable answer from the following options: -   (1*20=20)


(i) Choose file extension used by NumPy binary files. NumPy

(a). npy

(b) .txt

(c) .csv

(d) .dat


(ii) Choose from the following which is NOT a broadcasting rule.

(a) Dimension are compared element-wise

(b) Missing dimensions are treated as 1

(c) Shapes must be identical

(d) Compatible dimensions can be stretched


(iii) A variable in Python is a _______ which refers of a memory location, while ________ refers to the actual value stored in that location.  

(a) R-value

(b) O-value

(c) Token

(d) L-value


(iv) Assertion (A): Built-in functions like len(), print() and type() are available by default in Python.

       Reason (R): These function are part of the Python built-ins and do not require explicit import.

       Identify the correct option from the stated Assertion (A) -Reason (R):                                                       

(a) Both A and R are true, and R is the correct explanation of A                  

(b) Both A and R are true, and but R is not the correct explanation of A

(c) A is true, but R is false

(d) A is false, but R is true


(v) In Python, the ________ defines the valid characters used in a program, and ________ are the smallest building blocks of the program.

(a) Tokens

(b) Variables

(c) Character Set

(d) Operators


(vi) What is the output of the below among four given options?

    I = 1

    While I < 4:

       Print(I, end=” “)

       I += 1

(a) 1 2 3 4

(b) 1 2 3 

(c) 1 2

(d) infinite loop

 

(vii) A collection of modules in Python is called:

(a) Script

(b) Function

(c) Package

(d) Class


(viii) What is the output of the code below among four given options?

        For char in “PYTHON”:

           If char = = “T”:

               Break

      Print(char, end=”)

(a) PYTHON

(b) PY

(c) P Y T H O N

(d) PYTH


(ix) Match the items in Column A with their corresponding descriptions in Column B related to exception handling in Python programming.


Column A

Column B

try block

Executes if no exception occurs

except block

Code that may raise error

else block

Executes always (cleanup code)

finally block

Code that handles error

 


(x) The + operator, when used with two lists, performs element-wise addition of their contents.

(a) True

(b) False

 

Group:-"B"

 

➥ Answer all Five Questions: -                         (5*4=20) 

 

2. Explain the use of arithmetic operators in python with examples. 

           

OR

 Differentiate between assignment operator and augmented assignment operators with examples.

 

 

3. Write a Python program to check whether a given year is a leap year on not.  

OR

 Differentiate between break and continue statements. Write separate programs to demonstrate both.

 

4. Write a program to create and initialize a tuple. Demonstrate how to access tuple elements using indexing. 

OR

 Discuss dictionary in Python? Write a program to demonstrate – Accessing items using keys and adding a new item.

 

 

5.Differentiate between modules and packages in Python with examples. 

OR

 Explain the role and advantages of using PyPI (Python Package Index) in Python development.

 

6. Differentiate between text files and binary files in Python? Give examples.

OR

 

 

Group:- "C"

 

➥ Answer all Five Questions: -                         (5*6=30) 

 

7. Discuss continue and break with the help of python program. 

OR

Explain python variables and numeric data in detail.

 

8. Write a program in python to check whether string is palindrome or not.

OR

Discuss complete installation process of python in detail.

 

9. Write a python program to calculate the area and perimeter of circle using python. 

OR

Discuss append (), extend () and insert () function of python.

 

10. Write a python program to get the Fibonacci series between 0 to 55.  

OR

Define if, else and elif in python using program.

 

11. Write a Python program to demonstrate indexing and slicing operations on 1D and 2D NumPy arrays.  

OR

Discuss broadcasting in NumPy. Explain with an example of adding a scalar to a 2D array.

 

 

****

Q1

PYQ Video References

No references available right now.

Comments & Reviews

Loading comments...