JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech II Year PYTHON PROGRAMMING Previous Question Paper (April/May - 2023 - R18)
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
Distinguish between set and dictionary.
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
Distinguish between mutable and immutable types.
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.
Outline the standard files in python.
Answer
Sign in to view the complete answer paper.
What is the difference between try-except and try-finally?
Answer
Sign in to view the complete answer paper.
Which type of multithreaded application is better in Python, I/O-bound or CPU-bound? Why?
Answer
Sign in to view the complete answer paper.
Frame a regular expression to match the set of the string representations of all Python complex numbers.
Answer
Sign in to view the complete answer paper.
What is Partial Function Application?
Answer
Sign in to view the complete answer paper.
List the Web Server Modules and Classes.
Answer
Sign in to view the complete answer paper.
What are the possible values of thread safety attribute of DB-API module?
Answer
Sign in to view the complete answer paper.
What are the differences between the cursor fetch*() methods?
Answer
Sign in to view the complete answer paper.
Part B
Explain the functions used to convert lists to tuples and vice versa.
Answer
Sign in to view the complete answer paper.
Mention the object value comparison and object identity comparison operators.
Answer
Sign in to view the complete answer paper.
Elaborate on arithmetic operators in python.
Answer
Sign in to view the complete answer paper.
Determine the least common multiple of a pair of integers.
Answer
Sign in to view the complete answer paper.
Elaborate on raise statement used to raise exceptions.
Answer
Sign in to view the complete answer paper.
Compare and contrast absolute import and relative import in packages.
Answer
Sign in to view the complete answer paper.
Display all lines of a file, except those that start with a pound sign ( # ).
Answer
Sign in to view the complete answer paper.
How to detect and handle exceptions?
Answer
Sign in to view the complete answer paper.
Develop Fibonacci, factorial, and summation (sum of n natural numbers) functions as multithreaded application.
Answer
Sign in to view the complete answer paper.
Elaborate on Queue class.
Answer
Sign in to view the complete answer paper.
Discuss in detail re Module and its Core Functions and Methods.
Answer
Sign in to view the complete answer paper.
Develop GUI application using Pmw module.
Answer
Sign in to view the complete answer paper.
Describe the Core urlparse Module Functions.
Answer
Sign in to view the complete answer paper.
Develop GUI application using wx module.
Answer
Sign in to view the complete answer paper.
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.
Answer
Sign in to view the complete answer paper.
Write SQL commands to perform the various database operations.
Answer
Sign in to view the complete answer paper.
Describe the multi-tiered communication between application and database.
Answer
Sign in to view the complete answer paper.
Discuss the various Connection Object Methods.
Answer
Sign in to view the complete answer paper.
How to use database adapter with MySQL?
Answer
Sign in to view the complete answer paper.