0% found this document useful (0 votes)
3 views1 page

Python Programming Jan 2023

This document outlines the examination paper for the Python Programming course for B. Tech II Semester students in January/February 2023. It includes various questions from five units covering topics such as program development, string methods, functions, classes, and exception handling. Students are required to answer five questions, with one from each unit, and all questions carry equal marks.

Uploaded by

pnagasai16
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Python Programming Jan 2023

This document outlines the examination paper for the Python Programming course for B. Tech II Semester students in January/February 2023. It includes various questions from five units covering topics such as program development, string methods, functions, classes, and exception handling. Students are required to answer five questions, with one from each unit, and all questions carry equal marks.

Uploaded by

pnagasai16
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Code No: R201225 R20 SET - 1

I B. Tech II Semester Supplementary Examinations, January/February - 2023


PYTHON PROGRAMMING
(Common to CSE, IT, CSE-AI&ML,CSE-AI, CSE-DS, CSE-AI&DS, AI&DS )
Time: 3 hours Max. Marks: 70
Answer any FIVE Questions ONE Question from Each Unit
All Questions Carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
UNIT -I
1 a) Describe various phases of a program development cycle with a neat diagram. [7M]
b) Write a python code to demonstrate type conversions using int (), float () and str (). [7M]
(OR)
2 a) Define comment and list out different types of comments with syntax. [7M]
b) Write Pythonic code to multiply two matrices using nested loops and print the result. [7M]
UNIT -II
3 a) Discuss about the rstrip(), lstrip(),strip() methods that are used to remove spaces from a [7M]
string.
b) What are the different flow control statements available in python? Explain with suitable [7M]
examples.
(OR)
4 a) Write Python Program to reverse a number and also find the Sum of digits in the [7M]
reversed number. Prompt the user for input.
b) Explain the use of join() and split() string methods with examples. [7M]
UNIT -III
5 a) Write a Python program using function to find out the given string is palindrome or not. [7M]
b) For a given list num=[45,22,14,65,97,72], write a python program to replace all the [7M]
integers divisible by 3 with “ppp” and all integers divisible by 5 with “qqq” and replace
all the integers divisible by both 3 and 5 with “pppqqq” and display the output.
(OR)
6 a) Write a program to create a list with computer languages and display the same by using [7M]
while loop.
b) How to rename a module in python and write the syntax and program. [7M]
UNIT -IV
7 a) Write a Pythonic code to count and print the occurrence of each of the word in the file [7M]
using dictionaries. Prompt the user for the filename.
b) What is a class? How to define class in python? How to initiate a class and how the class [7M]
members are accessed?
(OR)
8 a) Write Pythonic code to overload “+” and “-“operators by providing the methods [7M]
__add__ and __sub__.
b) Describe the role of object oriented programming compared with the procedure oriented [7M]
programming.
UNIT -V
9 a) What s the difference between else block and finally block in exception handling? [9M]
Explain with an example program.
b) What are the advantages and disadvantages of GUI based programs? [5M]
(OR)
10 Write a Python program that creates a GUI with a textbox, Ok button and Quit button. [14M]
On clicking Ok, the text entered in textbox is to be printed in Python shell; on clicking
Quit, the program should terminate.
*****
|'''|'|'|''|''||'||| 1 of 1

You might also like