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

Share:WhatsAppTelegram
Question 1

Python Programming 2024 OLD PYQ.


Group A

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


(i) Python has _____________ function for taking user input.

(a) output

(b) input

(c) get

(d) none of the above


(ii) An ____________ is a combination of values, variables and operators.

(a) Explanation

(b) Expression

(c) Logic

(d) None of the above


(iii) A while loop will always execute at least once.

(a) True

(b) False

(c) Cannot say

(d) None of the above


(iv) A python program may have more than one elif statement

(a) True

(b) False

(c) Cannot say

(d) None of the above 


(v) Match the following:

 


What keyword is used exit a function and return a value?

Def

What keyword is used to define a function?

By writing the function’s name followed by parentheses

How do you call a function?

Return

 

 


(vi) List is immutable data structure.

(a) True

(b) False

(c) Cannot say

(d) None of the above


(vii) Find the ODD one out. 

(a) Dictionary

(b) List

(c) Set

(d)Function


(viii) Dictionary supports ____________ pairs:

(a) key:value 

(b) key:lock

(c) index:vlaue

(d) index:key


(ix) ODD one out. 

(a) if

(b) else

(c) elif

(d) else if

 
(x) Tuple and list both are same

(a) True

(b) False

(c) Cannot say

(d) None of the above 

 

 

Group:-"B"

 

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

 

2. Describe the process of setting up the Python path and installing Python on a computer.

OR

Explain various data types used in Python.

 

3. Explain coding blocks in Python with the help of an example.

OR

Explain the use of if-else statements for creating conditional blocks in Python.

 

4. Explain the concept of arrays in Python with the help of example.

OR

Differentiate between tuples and list with the help of examples.

 

5. Demonstrate the concept of function in Python with the help of example.

OR

Demonstrate the concept of module in Python with the help of example.

 

6. Discuss File input and output and their importances in Python.

OR

Discuss the process to append text to a file and displaying the text in python.

 

Group:- "C"

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

 

7. Explain the use of "continue" and "break" statements for loop manipulation in Python.

OR

Write a Python program that uses a loop to print all prime numbers between 1 and 100.

 

8. Explain the purpose of functions in Python. Provide an example of defining and using a function.

OR

Differentiate between a module and a package in Python.

 

9. Discuss read and write functions for file operations in Python.  

OR

Write a Python program that reads a text file, counts the number of words, and prints the count.

 

10. Explain the purpose of a framework in programming. Name two Python web frameworks.  

OR

Choose one of the mentioned frameworks (Web2Py or Django) and briefly describe its key features.

 

11. Write a Python program that uses a loop to print all the factors of 128. (e.g. factors of 8 are 1,2,4, and 8) 

OR

Write a python program to find the factorial of a number (e.g. 8) using for loop.

 

 


 

*****

Q1

PYQ Video References

No references available right now.

Comments & Reviews

Loading comments...