0% found this document useful (0 votes)
6 views

PythonProgramming 22PLU105B Modelquestion Paper 2

Uploaded by

harishkrgowda60
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

PythonProgramming 22PLU105B Modelquestion Paper 2

Uploaded by

harishkrgowda60
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Page 1 of 1

22PL
USN
U105B
B. E. First Semester End Examination (SEE), 2022-23
Model Paper-2
Introduction to Python Programming
[Time:
3
[ Maximum Marks: 100]
Hours
]
NOTE
:
Answe
r ANY
ONE
full
questi
on as
per
the
choice
given
below.
Q. No. Questions Marks CO RBT
(a) Discuss the features of python program and different data types in
[10 Marks] CO1
1 python with examples
(b) explain basic input output statement in python [04 Marks] CO1
(c) Write a python program to predict given number is prime or not
[06 Marks] CO1
prime.
OR
2. a) Define Identifiers. Explain rules to define an identifier in python. [04 Marks]
CO1
b) Discuss arithmetic operator, logical operator, comparison operator, [10 Marks]
assignment operators in python with suitable examples CO1

c) Develop a Program to Prompt for a Score between 0 to 100. If the [06 marks]
score Is Out of Range, Print an Error. If the Score Is between 0 to
100, Print a Grade Using the Following Table

Score grade
100 – 90 O CO1
89 - 66 A
65 - 58 B
57 - 51 C
50 - 40 pass
< 40 Fail
3. a) Explain with proper syntax function definition in python. Write a [6 marks]
program to explain defining default parameters in function. CO2

Dr. Ambedkar Institute of Technology, Bangalore – 560056


(An Autonomous Institution Affiliated to Visvesvaraya Technological University, Belgaum)
Page 1 of 1

b) Explain slicing and negative slicing with examples with respect to [6 Marks]
strings CO2

c) Develop a python program to calculate the number of vowels, [8 Marks]


consonants and special characters in a given string CO2

OR
4 a) Develop a program to find the sum and average of numbers using [6 Marks]
functions CO2

b) Write the code snippet and output for the following string methods [10 marks]
CO2
i)join ii)split iii) count iv)lower and upper v) swapcase

c) Explain the use of return statement with examples? [4 marks] CO2


5 a) Program to simulate kannada to English dictionary? [6 Marks] CO3
b) Perform the following list operations with output [10 Marks]

i) Inserting an element into the list


ii) Deleting an element from the list
CO3
iii) Index operation
iv) Sort the list
v) Find the maximum number in the list

c) Discuss the list in python with suitable examples [04 Marks] CO3
OR

6 a) Explain dictionary with suitable example in python [6 Marks] CO3


b) Develop python program to demonstrate the linear search applied on [6 Marks]
integer list and display the appropriate messages? CO3

c) Explain any four dictionary methods with code snippet and output [8 Marks] CO3
7 a) Describe sets in python. Illustrate with python a code to create a set [10 Marks]
and perform the following operations on sets.
i. an intersection
ii. union CO3
iii. set difference
iv. Symmetric difference of sets.
b) Explain tuples with suitable examples [4 Marks] CO3
c) Develop a python program to identify number of vowels, consonants, [6 Marks]
special characters and digits in a given file. CO4

OR

8 a) Discuss the different file access modes with examples [10 Marks] CO4
b) Explain and four basic operations of Tuples with proper examples. [6 Marks] CO3

Dr. Ambedkar Institute of Technology, Bangalore – 560056


(An Autonomous Institution Affiliated to Visvesvaraya Technological University, Belgaum)
Page 1 of 1

c) Explain the different reading methods with respect to files [4 Marks] CO4
9 a) Discuss try-catch-finally with examples [08 Marks] CO4
b) Discuss the features of oops [6 Marks] CO5
c) Explain constructors in python with example? [6 Marks] CO5
10 a) Explain the classes and objects with examples [10 Marks] CO5
b) Differentiate between error and exceptions? Write a Python program [10 Marks]
which will throw exception if the value entered by user is less than CO4
zero.

Dr. Ambedkar Institute of Technology, Bangalore – 560056


(An Autonomous Institution Affiliated to Visvesvaraya Technological University, Belgaum)

You might also like