JNTU

JNTU B.Tech IV Year PYTHON PROGRAMMING Previous Question Paper (July/August - 2022 - R18)

B.Tech | IV Year | IV-I | R18 | July/August - 2022

Answer PaperPaper Code: 157EYMaximum Marks: 75Time: 3 Hours

Answer any five questions

All questions carry equal marks

Main

115 marks
a

Describe the important features of Python.

7 marks

Answer

Python is a high-level, interpreted, and general-purpose programming language known for its simplicity and versatility. Its key features include:

  • Simple and Readable Syntax: Python uses indentation to define code blocks, making the code clean and easy to read compared to languages that use braces.
  • Interpreted Language: Code is executed line-by-line, which simplifies debugging and testing.
  • Dynamically Typed: Variable types are determined at runtime, so there is no need to declare variable types explicitly.
  • Extensive Standard Library: It comes with a vast collection of modules and packages that support various tasks like file I/O, networking, and data manipulation.
  • Cross-Platform Support: Python code can run on different operating systems like Windows, macOS, and Linux without modification.
  • Object-Oriented and Procedural: It supports multiple programming paradigms, allowing developers to use object-oriented, procedural, or functional styles.
  • Embeddable and Extensible: Python can be integrated with C or C++ code, and it can be embedded into other applications to provide scripting capabilities.
b

With examples illustrate augmented assignment and multiple assignment operators.

8 marks

Answer

Assignment operators are used to assign values to variables. Augmented and multiple assignments provide concise ways to perform these operations.

Augmented Assignment Operators: These combine an arithmetic operation with an assignment. They are shorthand for updating a variable's value based on its current value.

x = 10 x += 5 # Equivalent to x = x + 5, now x is 15 x *= 2 # Equivalent to x = x * 2, now x is 30

Multiple Assignment Operators: Python allows assigning values to multiple variables in a single statement. This is useful for swapping values or initializing several variables at once.

# Assigning multiple values a, b, c = 1, 2, 3 # Swapping values a, b = b, a # Now a is 2 and b is 1 # Assigning the same value to multiple variables x = y = z = 100
215 marks
a

How does garbage collector work in Python?

5 marks

Answer

Sign in to view the complete answer paper.

b

Differentiate between lists and tuples.

5 marks

Answer

Sign in to view the complete answer paper.

c

How to unify integers and long integers?

5 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Illustrate the following file methods: readline, readlines, tell, seek.

7 marks

Answer

Sign in to view the complete answer paper.

b

Write a program to append the content of first file to second file. Read two file names as command line arguments.

8 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

How can programmers create their own exception classes in Python? Give example.

5 marks

Answer

Sign in to view the complete answer paper.

b

What is a python module? Compare with functions.

5 marks

Answer

Sign in to view the complete answer paper.

c

How do namespaces relate to variable scope?

5 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Does regular expression pattern enable matching of multiple strings? Justify your answer with illustrations.

8 marks

Answer

Sign in to view the complete answer paper.

b

Describe the core functions and methods of re module of Python.

7 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

Differentiate between process and thread. How to access threads from Python?

7 marks

Answer

Sign in to view the complete answer paper.

b

Write a program to develop a multithreaded application using standard library modules related to threading.

8 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

Discuss any eight Tk widgets used in GUI programming.

7 marks

Answer

Sign in to view the complete answer paper.

b

What is a web crawler? Write Python code for a web crawler.

8 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

Illustrate the use of DB-API module attributes.

7 marks

Answer

Sign in to view the complete answer paper.

b

Make a comparison of the two well-known Python object relational managers – SQLAlchemy and SQLObject.

8 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of PYTHON PROGRAMMING from JNTU for B.Tech MME-MMT IV Year IV-I, July/August - 2022, R18.

For the solved question paper with answers, switch to the Answer Paper tab.

Other papers in PYTHON PROGRAMMING

Loading Question Papers

Fetching data from database...