JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA 2022 PYTHON PROGRAMMING Previous Question Paper (October/November - 2022 - R20)
Answer any five questions. All questions carry equal marks.
Main
What are various internal types in Python? Explain.
Answer
Python is a dynamically typed language where every value is an object belonging to a specific internal type. These types define the data's behavior and the operations that can be performed on them.
- Numeric Types: Include int (arbitrary precision integers), float (double-precision floating-point numbers), and complex (numbers with real and imaginary parts denoted by j).
- Sequence Types: Ordered collections of items. These include str (immutable sequences of Unicode characters), list (mutable sequences), and tuple (immutable sequences).
- Mapping Type: The dict type represents a collection of key-value pairs, providing efficient lookups.
- Set Types: set (mutable, unordered collection of unique elements) and frozenset (immutable version of a set).
- Boolean Type: The bool type represents truth values, limited to True and False.
- NoneType: Represents the absence of a value, containing only the single object None.
Discuss about different types of operators supported by Python with examples.
Answer
Python supports several categories of operators to perform operations on variables and values:
- Arithmetic Operators: Used for mathematical calculations. Examples: +, -, *, /, // (floor division), % (modulus), and ** (exponentiation). Example: 5 // 2 results in 2.
- Comparison Operators: Used to compare values. Examples: ==, !=, >, <, >=, <=. Example: 10 > 5 returns True.
- Logical Operators: Used to combine conditional statements. Examples: and, or, not. Example: (x > 5 and x < 10).
- Bitwise Operators: Perform operations on binary representations. Examples: &, |, ^, ~, <<, >>.
- Assignment Operators: Used to assign values to variables. Examples: =, +=, -=, *=. Example: x += 3 is equivalent to x = x + 3.
- Membership Operators: Check for existence in a sequence. Examples: in, not in. Example: 'a' in 'apple' returns True.
- Identity Operators: Compare memory locations. Examples: is, is not. Example: x is y returns True if both variables point to the same object.
Explain about related modules in Python.
Answer
Sign in to view the complete answer paper.
What are special features of strings? Explain with examples.
Answer
Sign in to view the complete answer paper.
List and explain various module built-in functions.
Answer
Sign in to view the complete answer paper.
How exceptions are created? Explain in detail.
Answer
Sign in to view the complete answer paper.
Define file object. Explain in detail about file objects in Python.
Answer
Sign in to view the complete answer paper.
List and explain standard exceptions with examples.
Answer
Sign in to view the complete answer paper.
Explain about special symbols and characters in Python.
Answer
Sign in to view the complete answer paper.
Describe accessing a thread from Python. Also describe how life is without thread.
Answer
Sign in to view the complete answer paper.
Explain about core methods and functions of RE module.
Answer
Sign in to view the complete answer paper.
Describe producer consumer problem and queue module.
Answer
Sign in to view the complete answer paper.
Explain about Tk interface extensions (Tix).
Answer
Sign in to view the complete answer paper.
Explain in detail about advanced Web clients.
Answer
Sign in to view the complete answer paper.
Explain the following:
Related modules of DB programming
Answer
Sign in to view the complete answer paper.
Various commands in SQL.
Answer
Sign in to view the complete answer paper.