Jawaharlal Nehru Technological University Hyderabad

Jawaharlal Nehru Technological University Hyderabad B.Tech II Year PYTHON PROGRAMMING Previous Question Paper (March - 2021 - R18)

B.Tech | II Year | I Semester | R18 | March - 2021

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

Answer any five questions. All questions carry equal marks.

Main

115 marks
a

Discuss the features of Python.

5 marks

Answer

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

  • Simple and Readable: Python uses a clean syntax that emphasizes code readability, making it easy to learn and maintain.
  • Interpreted: Code is executed line-by-line, which simplifies debugging and testing.
  • Dynamically Typed: Variable types are determined at runtime, eliminating the need for explicit type declarations.
  • Extensive Standard Library: It provides a vast collection of modules and functions for various tasks, such as file I/O, networking, and data manipulation.
  • Cross-Platform: Python code can run on different operating systems like Windows, macOS, and Linux without modification.
b

What are the main differences between lists and tuples?

5 marks

Answer

The primary differences between lists and tuples are:

FeatureListTuple
MutabilityMutable (can be modified)Immutable (cannot be modified)
SyntaxDefined using square brackets []Defined using parentheses ()
PerformanceSlower due to dynamic natureFaster due to fixed size
MethodsSupports many methods (append, remove, etc.)Supports limited methods (count, index)

Lists are ideal for collections of items that may change during program execution, whereas tuples are used for fixed data structures where integrity must be preserved.

c

Illustrate the use of None type.

5 marks

Answer

Sign in to view the complete answer paper.

215 marks
a

Categorize Python’s standard types.

7 marks

Answer

Sign in to view the complete answer paper.

b

Python has five operational built-in functions for numeric types. Discuss them with examples.

8 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Explain the various access modes for File Objects.

7 marks

Answer

Sign in to view the complete answer paper.

b

Write a program to prompt for a file name and display the number of lines in that text file.

8 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

Differentiate between error and exception.

7 marks

Answer

Sign in to view the complete answer paper.

b

Explain any four ways of use of raise statement.

8 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Compare compile, match, search functions of RE module.

7 marks

Answer

Sign in to view the complete answer paper.

b

What are threads? How can they support parallel processing?

8 marks

Answer

Sign in to view the complete answer paper.

6

Discuss the 15 types of widgets of Tk being used in Python for Graphical user interface programming.

15 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

What is a URL? What is a URI? Describe the components of Web address.

8 marks

Answer

Sign in to view the complete answer paper.

b

Compare and contrast CGI application with a typical Python script.

7 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

What is a database? What DML commands are supported by Python?

8 marks

Answer

Sign in to view the complete answer paper.

b

Discuss the steps to connect to MySQL database from Python.

7 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 ITE II Year I Semester, March - 2021, 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...