Code No: R2022021 R20 SET - 1
II B. Tech II Semester Regular/Supplementary Examinations, July - 2023
PYTHON PROGRAMMING
(Common to EEE & FE)
Time: 3 hours Max. Marks: 70
Answer any FIVE Questions each Question from each unit
All Questions carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~
UNIT-I
1 a) How to declare and call functions in Python programs? Explain in detail. [7M]
b) Explain various Data types in Python programming. [7M]
Or
2 a) Explain the syntax of various Conditional structures in Python programming. [7M]
b) Write a Python program to demonstrate explicit type conversion. [7M]
UNIT-II
3 a) Describe the various operations on text files. [7M]
b) Write a Python program that interchanges the first and last characters of a given [7M]
string.
Or
4 a) Describe the various string methods in Python. [7M]
b) Explain How to write a String to a text file in Python with a sample program. [7M]
UNIT-III
5 a) List and explain various Python List Built-in methods. [7M]
b) Explain the steps to create a Dictionary in Python. [7M]
Or
6 a) Explain the problem solving with Top-Down Design. [7M]
b) Write a program that applies recursion to compute the factorial of a number. [7M]
UNIT-IV
7 a) Describe How to make a Python class member variable hidden from outside the [7M]
class.
b) Discuss Polymorphism using an example program. [7M]
Or
8 a) Explain file operations with a suitable program. [7M]
b) Write a Python program that applies Seek function on files. [7M]
UNIT-V
9 a) How to handle multiple exceptions with single except clause? Explain. [7M]
b) Write a python program to illustrate the cases where a try block throws multiple [7M]
Exceptions?
Or
10 a) Describe the four main elements of Scratch programming environment. [7M]
b) Compare the GUI-based programs with Terminal-based programs. [7M]
1 of 1
|''|'||||''|'''|||'|
Code No: R2022021 R20 SET - 2
II B. Tech II Semester Regular/Supplementary Examinations, July - 2023
PYTHON PROGRAMMING
(Common to EEE & FE)
Time: 3 hours Max. Marks: 70
Answer any FIVE Questions each Question from each unit
All Questions carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~
UNIT-I
1 a) Explain few most commonly used built-in types in python programming. [7M]
b) Demonstrate the use of break and continue keywords in looping structure. [7M]
Or
2 a) Write a Python program to demonstrate How to access the characters in Python [7M]
String.
b) List and explain different operators in Python in the order of their precedence. [7M]
UNIT-II
3 a) Explain the syntax of ‘while’ loop with an example. [7M]
b) Write a Python function that prints all factors of a given number. [7M]
Or
4 a) Discuss the read-write operations of the text file in Python language. [7M]
b) Write a Python program to get substring between characters in the input. [7M]
UNIT-III
5 a) Demonstrate the usage of Lambda function in Python. [7M]
b) Write a Python function to print the even numbers from a given list. [7M]
Or
6 a) Discuss any three standard modules in Python. [7M]
b) Describe various ways to create Lists in Python. [7M]
UNIT-IV
7 a) Write a Python program that overloads + operator, to add two objects of a class. [7M]
b) Write a program that reads a text file and changes the file by capitalizing each [7M]
character of file.
Or
8 a) Explain the functions write and write lines with examples. [7M]
b) Describe the steps to create Classes and Objects in Python. [7M]
UNIT-V
9 a) Discuss about built-in error types in Python. [7M]
b) How to create two radio button sets (one for gender and another for Indian or not) [7M]
on the same canvas? Explain
Or
10 a) Explain the importance of GUI based programs with an example. [7M]
b) Write program to calculate your age in days. (days between Today and Date of [7M]
Birth)
1 of 1
|''|'||||''|'''|||'|
Code No: R2022021 R20 SET - 3
II B. Tech II Semester Regular/Supplementary Examinations, July - 2023
PYTHON PROGRAMMING
(Common to EEE & FE)
Time: 3 hours Max. Marks: 70
Answer any FIVE Questions each Question from each unit
All Questions carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~
UNIT-I
1 a) Explain various operators, built-in functions and standard library modules that deals [7M]
with Python’s numeric type.
b) Write a Python program to print all prime numbers. [7M]
Or
2 a) List out various operators available in Python and explain their precedence and [7M]
Associativity.
b) Demonstrate Nested decision structure with example program. [7M]
UNIT-II
3 a) Explain the string operations length and slicing in detail with an example. [7M]
b) Write a Python program to perform sorting of given input strings. [7M]
Or
4 a) Explain various string methods in Python with examples. [7M]
b) Discuss the sequence of steps to encrypt and decrypt Strings in Python. [7M]
UNIT-III
5 a) What are Python modules? Explain in detail. [7M]
b) Write a Python program to extract characters from various text files and puts them [7M]
into a List.
Or
6 a) Explain the methods of list structure with examples. [7M]
b) Explain recursion with an example Python program. [7M]
UNIT-IV
7 a) Explain different types of inheritance supported by Python. [7M]
b) Discuss the use of Destructor with a Python program. [7M]
Or
8 a) Explain about the usage of issubclass() and isinstance() methods in Python. [7M]
b) Explain the Python‘open()’ built-in function. [7M]
UNIT-V
9 a) How to create, raise and handle user defined exceptions in Python? Explain. [7M]
b) Write a Python program to handle division by zero exception. [7M]
Or
10 a) Explain GUI-based program coding with an example. [7M]
b) Write Python script that prints calendar of April 2023. [7M]
1 of 1
|''|'||||''|'''|||'|
Code No: R2022021 R20 SET - 4
II B. Tech II Semester Regular/Supplementary Examinations, July - 2023
PYTHON PROGRAMMING
(Common to EEE & FE)
Time: 3 hours Max. Marks: 70
Answer any FIVE Questions each Question from each unit
All Questions carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~
UNIT-I
1 a) Explain the key features of Python programming. [7M]
b) Explain different operators supported by Python. [7M]
Or
2 a) Explain the syntax of Repetition structures in Python. [7M]
b) What a Python program to demonstrate Type conversions. [7M]
UNIT-II
3 a) Explain the syntax of ‘for’ loop with an example. [7M]
b) Write a Python program to check whether a given number is Armstrong or not. [7M]
Or
4 a) Explain Data Encryption in Python with an example. [7M]
b) Write Python program to demonstrate the usage of common Python String methods. [7M]
UNIT-III
5 a) Describe various ways to access the elements of a List in Python with example. [7M]
b) Write a Python program to access the elements of a Nested dictionary. [7M]
Or
6 a) Discuss any four packages of Python language. [7M]
b) Explain the importance and implementation of Abstraction mechanism in Python. [7M]
UNIT-IV
7 a) How to implement method overriding in Python? Explain. [7M]
b) Explain Data modeling with an example. [7M]
Or
8 a) Describe the steps for writing, reading and extracting values from config files. [7M]
b) How do you manipulate a file pointer in Python? Explain with a sample program. [7M]
UNIT-V
9 a) Explain the difference between else block and finally block in exception handling. [7M]
b) Write a Python program that creates a GUI with a textbox, Ok button and Quit [7M]
button. On clicking Ok, the text entered in textbox is to be printed in Python
shell; on clicking Quit, the program should terminate.
Or
10 Describe the use of the four main elements of scratch- Programming palette, storage [14M]
area, Sprites and Script.
1 of 1
|''|'||||''|'''|||'|