Previous Question Papers
Previous Question Papers
Page 1 of 2
OR
syntax and examples.
A Explain if, if-else, if-elif-clse statementswith |5M)
B Write the syntax and examples for loops supported by python. (SM|
SECTION-III
6 A Distinguish between Indexing and Slicing on Arrays. maximum in an |SMI
B Implement a Python program to find the minimum and [5M|
array of integers.
OR
7 A Define an Array? Explain in details about types of arrays? Outlining to |5M)
creating, access and manipulate elements in arrays?
B Design and Develop a Python Program to find the Electricity unit |5M)
charges by using following condition and calculate the total electricity,
Bill?
For first 50 units Rs. 1.50/unit
For next 100 units Rs. 1.75/unit
For next 100 units Rs. 2.20/unit
For unit above 250 Rs. 2.50/unit
NOTE: An additional surcharge of 20% is added to the bill.
Take Input: -
Enter units: 120
Find the output?
8
SECTION-IV
A Write the different types of Python Function arguments. Explain in detail
B Write a python program for given number is Armstrong number or not. [5M]
OR
[SM]
A Write a program to print Fibonacci sequence up to given
B Design and develop a Python program to find the factorialnumber 'n'.
of a number.
[5M]
SECTION-V [5M]
10 A Define a file? What are the different types of files and write the
modes of file? Give an example. Access [5M]
B Write a GUI program that converts temperature from
Fahrenheit. Celsius to (5M]
OR
11 A Define exception. Explain any 4 exceptions that could occur in code with
suitable examples? [SM]
B Explain exception handling mechanisms with example program.
** * [5M]
Page 2 of 2
R22
Code No: R22A0S02
MALLAREDDY COLLEGE OF ENGINEERING & TECHNOLOGY
(Autonomous Institution UGC, Govt. of India)
IB.Tech II Semester Supplementary Examinations, January 2024
Python Programming
(Common to all branches)
Roll No
Page 1 of 2
OR
7 A Distinguish between indexing and slicing on arrays. |5M,
numbers
B Write a python program to sum an array of (5MI
SECTION-IV
multiply two numbers
A Generate a program that uses lambda function to number
|SM)
B Write a function to return right most digit in the entered [5M)
OR
A How do we achieve code reusability in python? Writea python code to (5M)
Explain code reusability
B Explain python function arguments with examples. [5M]
SECTION-V
10 A Write a program to write and read data from a file. (SM]
B Evaluate syntax and logical errors in compilation? Adapting with 5M)
Program and Examples?
OR
11 Define exception? Explain exception handling and multiple exceptions [10M]
handling mechanism with example.
Code No: R20A0502 R20
MALLAREDDY COLLEGE OF ENGINEERING& TECHNOLOGY
(Autonomous Institution - UGC, Govt. of India)
IB.Tech ll Semester Supplementary Examinations, January 2024
Python Programming
(EEE, ME, ECE, CSE, IT,CSE-CS, CSE-AIML & CSE-I0T)
Roll No
SECTION-I Marks
A What is the difference between Lists andTuples? Givean example for their [7M)
usage.
B Define a dictionary? Illustrate any 3 functions on lists with examples. [7M]
OR
2 A What are the basic list operations that can be performed in Python? Explain [7M]
each operation with its syntax and example.
B How are type conversions done in python? Illustrate with suitable [7M]
examples?
SECTION-II
3 A Discuss with suitable examples, membership and identity operators in [7M]
python?
B Define Operator. Explain about Relational and Bitwise operators with their [7M]
syntax and examples?
OR
4 A What is dynamic typing? Discuss the various ways of defining a variable in [7M]
python?
B Show an example of how precedence of operators effects an expression [7M]
evaluation?
SECTION-III
5 A Explain the purpose of loop structure in a programming language. Describe [8MJ
the syntax and semantics of any two loop structures provided by Python.
B Discuss about break and continue Loop manipulation statements with [6M)
syntax, flowchart and examples
OR
6 A What are the different conditional statements available in python? Explain [6M]
with syntax and examples.
B List various types of operators and explain any five types of operators. [8M]
SECTION-IV
7 A List and explain the four types of arguments supported by python [7M]
functions?
B What are fruitful functions? Discuss with syntax and example? [7M]
OR
8 A Compare and contrast an anonymous function and a regular function? [7M]
Page 1 of 2
python with suitable
B Discuss about Powerful Lambda functions in (7M)
examples.
SECTION-V
they occur. [7M]
A List some few common Exception types and explain when
B Write a simple program which illustrates Handling Exceptions [?M]
OR
10 A Show with an appropriate example, how read and write operations are [6M)
performed on a file?
B What is a queue? Implement queue using a list in python? [8M]
***
MI Code No: R20A0502 R20
MALLA REDDY COLLEGE OF
ENGINEERING& TECHNOLOGY
(Autonomous Institution -UGC,Govt. of India)
IB.Tech II Semester
Supplementary Examinations, August 2023
Python Programming
(EEE, ME, ECE, CSE, IT,CSE-CS, CSE-AIML, CSE-IOT)
Roll No
SECTION-I Marks
A Discuss the two modes of using python interpreter? [7M|
B Write in detail about Tuples and Sets? [7M]
OR
2 A Explain the various numeric data types available in python. [7M|
B What is a List? Discuss indexing and slicing a list with suitable examples? [7M]
SECTION-II
3 A Define a Boolean expression? What operators are used to evaluate a {7M]
Boolean expression?
B Write a short note on Expressions with examples I7MI
OR
4 A Explain Arithmetic, Relational and Bitwise operators with their syntax and |10M]
examples?
B Discuss about Python Basic statements |4M]
SECTION-III
5 A Illustrate chained and nested conditional execution statements with syntax [7M)
and flowcharts?
SECTION-IV
A Explain Built-in Functions in python with suitable example 19 MI
7
Page 1of 2
scope of variables in python with an
B Explain about local and global
example?
OR
reduce functions with suitable (7M)
A Demonstrate the use of map, filter and
examples passed to a function with the [7M|
B Define a function? Explain how the arguments
help of an example?
SECTION-V
[7M]
9 A Explain about the different types of Exceptions in Python. examples [7M]
B Explain various Types of Data structures used in Python with
OR
(8M]
10 A Define exception. Explain any 4 exceptions that could occur in code with
suitable examples?
B What is a stack? Implement stack using a list in python? [6M]
***
Code No: R20A0S02 R20
MALLA REDIDY COLLEGE OF ENGINEERING& TECHNOLOGY
(Autonomous Institution - UGC,Govt. of India)
IB.Tech 1l Semester Supplementary Exanminations, February 2023
Python Programming
(EEE,ME, ECE, AE, CSE, IT,CSE-CS, CSE-AIML, CSE-DS &CSE-I0T)
Roll No
Max. Marks: 70
Time: 3 hours
Note: This question paper Consists of 5 Sections. Answer FIVE Questions, Choosing ONE
Question from each SECTION and each Question carries 14 marks.
***
SECTION-I
|7M]
A What are different applications of Python? Give examples. |7M]
B Define identifier? Discuss the rules to namne an identifier
OR
|7M]
2 A Differentiate between lists and tuples in Python? |7M)
two numbers without using
B Write a python script to perform swapping of
third variable.
SECTION-II
declarations in python with clear [7M]
3 A Discuss in detail about Multiple variable
examples? expressions by considering [7M|
B Write a python script to evaluate following
necessary inputs.:ax+bxtc
OR
operators & ldentity operatOrS with
4 A Illustrate Comparison operators, Logical
clear examples. given number.
a
B Write a python script to find factorial of
SECTION-III
{7M]
5 A Recall the Usage of while loops in python harmonic sum of n. |7M]
the
B Write a Python program that computes + (1/2")
.....
Harmonic Sum = (1/2) + (1/4) + (1/8) + (1/16) +
OR
dictionaries and sets. |7M]
6 A Give a comparison between lists, tuples, [7M|
B Display the following pattern using python script.
1 2 3 2
3 4 3 2
1
4 3 1
2 3 4 5
SECTION-IV
Python? Justify your answer with [7M|
A What type of parameter passing is used in
sample programs. (7M]
of a given number.
B Write a Python function that prints all factors
Page 1of 2
OR
8 A Differentiate Anonymous Functions and Fruitful Functions with examples. [7
B Classify Different types of Functions in Python [7
SECTION-V
9 A Define an Exception and explain the Exception handling mechanisms
supported by python
B Write a python script to delete duplicate strings from a list of strings. [7N
(Insertion order should maintain after deleting duplicate string).
OR
10 A What is data structure? Write the Major Applications of them? [7M
B Compare and Contrast Stacks and Queues. (7M
***
Code No:
R20
MALLA REDDY COLLEGE OF
(Autonomous ENGINEERING
Institution
& TECHNOLOGY
- UGC, Govt. of India)
IB.Tech Il Semester
Regular/Supplementary
Python Programming
Examinations, September 2022
(Common to all branches)
Roll No
[7M)
1 A Analyze Various Numeric Data Types in Python with examples. [7M)
B Wnte apython script to perform swapping of two numbers
[7M]
2 A Give a note on each of the below Python language constructs:
statements (iii) indentation
(1) quotes (single, double and triple) (ii) multilinewith clear examples. [7M]
B Discuss about DataType conversions in Python
examples. [7M]
3 A What is if statement and explain about the if- else with [7M]
B Display the following pattern using python script.
1
12
123
1234
12345
about identity and
4 A Name Various operators in Python? Describe specifically
membership operator? statement with
-else)
B Write the syntax for chained conditional (if- elif
program.