PGDCA Previous Year Questions (Python)

IT & Software

| 302 views

1. Compare Break and Continue statement, illustrate the use of both statements through a suitable code in python.

2. How do Mutable data types differ from Immutable data types ? Briefly discuss the syntax and utility of the following data types in python :

(i) Lists

(ii) Tuples

(iii) Dictionaries

3. What are Co-routines ? Explain, how the co-routines support multitasking in Python.

4. Discuss the following terms in context of python. (Give example for each) : 

(i) Framework

(ii) Library

(iii) Package

(iv) Module

Also, give relation between them.

5. Discuss the function of connect( ) method of MySQL. Connection interface in Python. List the arguments involved in the connect( ) method. Write a python code to create database Employee_DB and prepare connection to suitable Employee_DB. (Make assumptions necessary). whereever 

6. What are Generators in Python ? Compare Generators and Lists. Also, discuss the utility of Generators in Python.

7. What is Jython ? How does Jython work ? Compare module and package in context of Python.

8. What are generators in Python ? Compare generators and lists. Also discuss utility of generators in Python.

9. What are iterators in Python ? How do iterators differ from iterables ? Give example of each. 

10.  What are co-routines ? How do co-routines support cooperative multitasking Python ?

11. What are Pandas ? Write steps to import, read and print a CSV file using Pandas. Also, transform your steps in to suitable code in Python.

12. What are lists ? How do lists differ from arrays ? What do you understand by the term “Lists are mutable but tuples are immutable” ? Write syntax for creation of list and accessing the last element of the list.

13. Write Python code to perform the following : (i) Copy a file first.txt to second.txt (ii) Reading a file (iii) Writing to a file (iv) Appending content to a file

14. What are tuples in Python ? What do you understand by the term ‘‘tuples are immutable’’ ? Write Python syntax for creation, printing and accessing specific element of the tuple.

15. What does map( ) function do ? Write a program in Python to print the cube of the numbers present in the list, by using map( ) function.

16. Write Python codes to perform the following :

(i) Reading data from a file.

(ii) Creating a file and adding contents to it.

Share this Post
About the Author

✍️ Satyendra Singh is a dedicated software educator and creator behind Quizer.in. With a passion for coding, learning, and teaching, he simplifies complex programming topics and builds engaging tools that make learning fun for everyone.

Comments

DBQMbVcHITImjJ 26 Sep, 2025

VxwzjqNFBCosH 29 Sep, 2025

NzvVrAigPTqvr 29 Sep, 2025

SutIjCrzXo 29 Sep, 2025

YBKCbrbARtGoBi 29 Sep, 2025

QvpBDdUR 29 Sep, 2025

AtnYiFLL 30 Sep, 2025

Leave a Comment

Your email address will not be published. Required fields are marked *

Popular Competitive Exam Quizzes