JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech II Year PYTHON PROGRAMMING Previous Question Paper (April/May - 2023 - R18)

B.Tech | II Year | I Semester | R18 | April/May - 2023

Answer PaperPaper Code: 153CDMaximum Marks: 75Time: 3 Hours

Question paper consists of Part A and Part B. Part A is compulsory, carrying 25 marks (Answer all questions). In Part B, answer any one question from each unit, carrying 10 marks each.

Part A

1.a

Distinguish between set and dictionary.

2 marks

Answer

A set is an unordered collection of unique elements, whereas a dictionary is an unordered collection of key-value pairs where keys must be unique. Sets are defined using curly braces

{1, 2, 3}
, while dictionaries are defined using key-value pairs separated by colons
{'key': 'value'}
.

1.b

Distinguish between mutable and immutable types.

3 marks

Answer

In Python, the distinction between mutable and immutable types lies in whether an object's value can be modified after it has been created.

  • Mutable types: These objects can be changed in-place after creation. This means their internal state or contents can be altered without changing the object's identity (memory address). Examples include lists, dictionaries, and sets.
  • Immutable types: These objects cannot be modified once created. Any operation that appears to change the value actually creates a new object in memory and assigns it to the variable. Examples include integers, floats, strings, and tuples.

Using mutable objects is generally more memory-efficient for large data structures that require frequent updates, whereas immutable objects are safer for use as dictionary keys or in multi-threaded environments because their state remains constant.

1.c

Outline the standard files in python.

2 marks

Answer

Sign in to view the complete answer paper.

1.d

What is the difference between try-except and try-finally?

3 marks

Answer

Sign in to view the complete answer paper.

1.e

Which type of multithreaded application is better in Python, I/O-bound or CPU-bound? Why?

2 marks

Answer

Sign in to view the complete answer paper.

1.f

Frame a regular expression to match the set of the string representations of all Python complex numbers.

3 marks

Answer

Sign in to view the complete answer paper.

1.g

What is Partial Function Application?

2 marks

Answer

Sign in to view the complete answer paper.

1.h

List the Web Server Modules and Classes.

3 marks

Answer

Sign in to view the complete answer paper.

1.i

What are the possible values of thread safety attribute of DB-API module?

2 marks

Answer

Sign in to view the complete answer paper.

1.j

What are the differences between the cursor fetch*() methods?

3 marks

Answer

Sign in to view the complete answer paper.

Part B

210 marks
a

Explain the functions used to convert lists to tuples and vice versa.

5 marks

Answer

Sign in to view the complete answer paper.

b

Mention the object value comparison and object identity comparison operators.

5 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
a

Elaborate on arithmetic operators in python.

5 marks

Answer

Sign in to view the complete answer paper.

b

Determine the least common multiple of a pair of integers.

5 marks

Answer

Sign in to view the complete answer paper.

410 marks
a

Elaborate on raise statement used to raise exceptions.

5 marks

Answer

Sign in to view the complete answer paper.

b

Compare and contrast absolute import and relative import in packages.

5 marks

Answer

Sign in to view the complete answer paper.

OR
510 marks
a

Display all lines of a file, except those that start with a pound sign ( # ).

5 marks

Answer

Sign in to view the complete answer paper.

b

How to detect and handle exceptions?

5 marks

Answer

Sign in to view the complete answer paper.

610 marks
a

Develop Fibonacci, factorial, and summation (sum of n natural numbers) functions as multithreaded application.

5 marks

Answer

Sign in to view the complete answer paper.

b

Elaborate on Queue class.

5 marks

Answer

Sign in to view the complete answer paper.

OR
7

Discuss in detail re Module and its Core Functions and Methods.

10 marks

Answer

Sign in to view the complete answer paper.

810 marks
a

Develop GUI application using Pmw module.

5 marks

Answer

Sign in to view the complete answer paper.

b

Describe the Core urlparse Module Functions.

5 marks

Answer

Sign in to view the complete answer paper.

OR
910 marks
a

Develop GUI application using wx module.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write an application to store names and corresponding phone number of friends into a two-column text file on disk and continue to add names each time the script is run.

5 marks

Answer

Sign in to view the complete answer paper.

1010 marks
a

Write SQL commands to perform the various database operations.

5 marks

Answer

Sign in to view the complete answer paper.

b

Describe the multi-tiered communication between application and database.

5 marks

Answer

Sign in to view the complete answer paper.

OR
1110 marks
a

Discuss the various Connection Object Methods.

5 marks

Answer

Sign in to view the complete answer paper.

b

How to use database adapter with MySQL?

5 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the solved question paper with answers of PYTHON PROGRAMMING from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for B.Tech CSE(SE) II Year I Semester, April/May - 2023, R18.

For the question paper without answers, switch to the Question Paper tab.

Other papers in PYTHON PROGRAMMING

Loading Question Papers

Fetching data from database...