0% found this document useful (0 votes)
2 views2 pages

Problem Solving Using Python Aug 2022

Uploaded by

lloyedmusindo2
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)
2 views2 pages

Problem Solving Using Python Aug 2022

Uploaded by

lloyedmusindo2
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: R201219 R20 SET - 1

I B. Tech II Semester Regular/Supplementary Examinations, Augustst- 2022


PROBLEM SOLVING USING PYTHON
(Com. to CSE-CS&T, CSE-CS, CSE-IOT&CS Incl BCT, CSE-CS&BS, CSE-IOT, Cyber
Security )
Time: 3 hours Max. Marks: 70
Answer any five Questions one Question from Each Unit
All Questions Carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
UNIT-I
1 a) Write a program to display the Fibonacci sequences up to nth term where the user (7M)
provides n.
b) Discuss the differences between While and FOR loop with an example. (7M)
Or
2 a) Write a program to find the sum of all Odd and Even numbers up to a number (7M)
specified by the user.
b) Explain the need for input validation loops with an example. (7M)
UNIT-II
3 a) Survey the commonly used String methods in Python with example codes? (7M)
b) Explain briefly about the Multi-Valued Data types, for example. (7M)
Or
4 a) Explain string slicing with suitable examples. (7M)
b) Write a Python program to search a given substring that is present in a given (7M)
string.
UNIT-III
5 a) Explain how functions can be used to provide abstraction. (7M)
b) Explain the advantage of packages. Explain the procedure to create a package and (7M)
use the same.
Or
6 a) Explain anonymous functions with examples. (7M)
b) What is a Module? Explain Module loading and execution in Python. (7M)
UNIT-IV
7 a) Explain how adding and retrieving dynamic attributes of classes is possible in (7M)
Python.
b) Explain how to define a Class and creation of Objects with an example Python (7M)
code.
Or
8 a) List and explain various built-in Class Methods and attributes in Python. (7M)
b) Explain the procedure to read and write from the file. (7M)

1 of 2

|'''|'|'|''|''||'|||
Code No: R201219 R20 SET - 1

UNIT-V
9 a) Develop a Python program to implement a single try block with multiple except (7M)
blocks and trace the code for its execution.
b) Explain how we can use the assert statement to generate Assertion Error with the (7M)
help of an example program.
Or
10 a) How to handle an exception using try-except block? Explain with the help of a (7M)
program.
b) Explain how data hiding is achieved in Python. (7M)

2 of 2

|'''|'|'|''|''||'|||

You might also like