0% found this document useful (0 votes)
83 views11 pages

Previous Question Papers

The document is an examination paper for Python Programming at Mallareddy College of Engineering & Technology, covering various topics such as data types, functions, loops, and exception handling. It consists of two parts: Part A, which is compulsory with 10 marks, and Part B, which contains five sections with questions from different units, each carrying 10 marks. The exam is designed for students across multiple branches and includes both theoretical questions and practical programming tasks.

Uploaded by

srujanbolli01
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)
83 views11 pages

Previous Question Papers

The document is an examination paper for Python Programming at Mallareddy College of Engineering & Technology, covering various topics such as data types, functions, loops, and exception handling. It consists of two parts: Part A, which is compulsory with 10 marks, and Part B, which contains five sections with questions from different units, each carrying 10 marks. The exam is designed for students across multiple branches and includes both theoretical questions and practical programming tasks.

Uploaded by

srujanbolli01
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
You are on page 1/ 11

R22

Code No: R22AO502


MALLAREDDY COLLEGE OF ENGINEERING & TECHNOLOGY
(Autonomous Institution UGC, Govt. of India)
IB.Tech IISemester Regular Examinations, August 2023
Python Programming
(Common to all branches)
Roll No

Time: 3 hours Max. Marks: 60


Note: This question paper contains two parts A and B
Part A is compulsory which carries 10 marks and Answer all questions.
Part B Consists of 5 SECTIONS (One SECTION for each UNIT). Answer FIVE
Questions, Choosing ONE Question from each SECTION and each Question carries 10
marks.

PART-A(10 Marks) Marks


(Write all answers of this PART at one place)
1 A What are the features of Python Programming Language? [IM]
B Distinguish between List and Tuple. [1M]
C List different conditional statements in python. [1M]
What is python continue statement? [1M]
E write the any three advantages of arrays in Python [1M]
F Define Dictionaries in python programming [1M]
Define function? Write its syntax. [1M]
H Define lambda function. [1M]
What are text files? How are they useful? [1M]
Give an example for how to read data from file. [IM]
PART-B (50 Marks)
SECTION-I
2 A List various types of operators in Python and write any Four types of (5M]
operators.
B Define List in Python? Describe the List usage with suitable examples. [5M]
OR
3 A Write short notes on the following? [SM]
i)) Multiline comments
i) Rules and Naming convention for variables and constants.
iii) Python Indentation
B Write a python program to simulate a basic calculator using functions for [5M]
add, subtract, multiply and divide.
SECTION-II
4 A What are the supported data types in Python? Explain it in detail? [SM]
B Write a program to simulate a guessing number game. Generate a [SM]
number from Ito 100 and ask the user to guess it correctly within 5 tries.
After each guess, the program must tell whether the number is higher
than, lower than, or equal to your guess.

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

Time: 3 hours Max. Marks: 60


Note: This question paper contains twoparts Aand B
Part Ais compulsory which carries 10marks and Answer allquestions.
Part B Consists of 5 SECTIONS (One SECTION for each UNIT). Answer FIVE
Questions, Choosing ONE Question from each SECTION and each Question carries
10 marks.

PART-A ( 10Marks) Marks


(Write all answers of this part at one place)
1 A Define the scope and lifetime of a variable in python. [1M]
B Compose the importance of indentation in python. [1M]
List the standard data types in python [1M|
D What is tuple? [1M]
Mention the types of arguments in python [1M]
F What is chained conditional statement? [1M]
G Define recursive function [1M]
H write the syntax of lambda function [1M]
List the types of files. [1M]
J What is an Exception? [1M]
PART-B(50 Marks)
SECTION-I
A What is Python? Describe its features and applications? [5M]
B Give a comparison between lists, tuples, dictionaries and sets. [SM]
OR
A Define string? Explain any five string methods with examples. [5M]
B Discuss the various operation that can be performed on a tuple and [5M]
Lists (minimum 5)with an example program
SECTION-II
4 A What are the different conditional statements available in python? [5M]
Explain with syntax and examples.
B Explain the purpose of loop structure in a programming language. [(5M]
Describe the syntax and semantics of any two loop structures provided
by Python.
OR
A List various types of operators and explain any five types of operators. |5M]
B Write a Python program to input any number and print all factors of that [5M]
number.
SECTION-III
A Explain any five numpy functions with examples. [5M]
B Define an array? Explain about I-D and 2-D array with example. |SM]

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

Time: 3 hours Max. Marks: 70


Note: This question paper Consists of 5Sections. Answer FIVE Questions, Choosing ONE Question
from each SECTION and each Question carries 14 marks.
***

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

Time: 3 hours Max. Marks: 70


Note: This question paper Consists of 5Sections. Answer FIVE Questions, Choosing ONE Question
from each SECTION and each Question carries 14 marks.
***

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?

B List and explain different iterative statements with syntax? |7M]


OR
6 A Explain about any two conditional statements in python with appropriate [7M|
Syntax and an example.
B Discuss about Loop manipulation using Continue and break |7M]

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

Time: 3 hours Max. Marks: 70

Answer Any Five Questions


AllQuestions carries equal marks.
***

[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.

5 A Differentiate Global and LOcal Variables.


example for each one. {7M]
B State the looping control statements and give an

6 A List and explain different arithmetic operators supported by Python.


numbers less than 256. |7M)
B Write a Python program to print all prime
characteristics of a lambda function? |7M]
7 A What is lambda function? What are the
Give an example. [7M)
B Write a Python Program to illustrate Exception Handling.
|7M]
A What is Data Structure? How Implement it? [7M]
B Write aPython Program to Implement Queues?
* **

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy