[go: up one dir, main page]

0% found this document useful (0 votes)
17 views2 pages

PYTHON PROGRAMMING (M.Tech)

This document outlines the examination paper for the II Semester M.Tech in Computer Science and Engineering, focusing on Python Programming. It includes various questions covering topics such as input operations, functions, recursion, classes, lists, file handling, and advanced list processing. The exam consists of multiple sections, with each question carrying equal marks and requiring illustrative programs and explanations.

Uploaded by

swastikiit2023
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views2 pages

PYTHON PROGRAMMING (M.Tech)

This document outlines the examination paper for the II Semester M.Tech in Computer Science and Engineering, focusing on Python Programming. It includes various questions covering topics such as input operations, functions, recursion, classes, lists, file handling, and advanced list processing. The exam consists of multiple sections, with each question carrying equal marks and requiring illustrative programs and explanations.

Uploaded by

swastikiit2023
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Sub Code: CST 323 ROLL NO……………..……………..

II SEMESTER EXAMINATION, 2022 – 23


(Ist Year M.Tech. –Computer Science and Engineering)
PYTHON PROGRAMMING

Duration: 3:00 hrs Max Marks: 100


Note: - Attempt all questions. All Questions carry equal marks. In case of any ambiguity or missing
data, the same may be assumed and state the assumption made in the answer.

Q 1. Answer any four parts of the following. 5x4=20


a) How do you perform input operations in Python?
b) Provide illustrative programs that demonstrate the usage of functions, modules,
and packages.
c) Write a program to check number is prime or not in python
d) What is immutability in Python? How does it apply to strings?
e) How do you assign a tuple in Python?
f) What are literals and how are they used in Python?

Q 2. Answer any four parts of the following. 5x4=20


a) Explain the concept of comments and their significance in Python programming.
b) Explain the concept of recursion in Python functions. Discuss how recursive
functions are defined and executed, including the base case and recursive case.
c) What is the flow of execution in Python? Explain with suitable example.
d) Can you provide illustrative programs for Fibonacci series using functions,
arithmetic operations using modules, and area calculations using packages in
Python?
e) How do you handle errors and exceptions in Python?
f) How do you sum an array of numbers in Python? Explain the logic behind the
program and provide a code example.

Q 3. Answer any two parts of the following. 10x2= 20


a) Explain the conditional if statement in Python. How does it work? Provide
examples to illustrate the usage of the if statement.
b) Discuss the concept of classes and objects in Python. Explain how classes are
defined and how objects are created from those classes. Discuss the concept of data
abstraction and how it is implemented using classes and objects.
c) Explain the basics of NumPy in Python. Discuss the concept of N-dimensional
arrays in NumPy and how they are used to store and manipulate large amounts of
data efficiently. Discuss the methods and properties available in NumPy for array
operations. Provide examples to illustrate the usage of NumPy arrays and their
methods.

Q 4. Answer any two parts of the following. 10x2= 20


a) Explain the concept of lists in Python. Discuss list operations, such as adding
elements, removing elements, and accessing elements in a list. Provide examples to
demonstrate these list operations.
b) Provide illustrative programs that demonstrate the usage of file handling,
exceptions, classes, and objects. Examples may include implementing a word count
program, copying a file, creating a user-defined exception, and creating a student
class with objects. Include step-by-step explanations and code examples for each
program.
c) Discuss how to read and write text files using Python's file handling capabilities.
Discuss the usage of the format operator for string formatting in file operations.
Provide examples to demonstrate the process of reading from and writing to text
files in Python.

Q 5. Answer any two parts of the following. 10x2= 20


a) Explain the concept of advanced list processing in Python. Discuss techniques
such as sorting, filtering, and mapping on lists. Provide examples to demonstrate the
implementation of advanced list processing techniques.
b) Discuss the usage of "globals()", "locals()", and "reload()" functions in Python.
Explain their purpose and how they can be used to access and modify variables and
modules. Provide examples to demonstrate the usage of these functions.
c) Discuss the process of creating your own modules in Python. Explain how to
define and use functions within a module. Discuss the benefits and best practices of
creating and organizing your own modules

**********

You might also like