Python Programming July 2023
Python Programming July 2023
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