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

USN 18CS34: B. E. Degree (Autonomous) Third Semester End Examination (SEE)

This document contains a model question paper for a Python programming examination. It consists of 10 questions divided into 3 sections with a total of 100 marks. The questions cover various Python programming concepts like operators, data types, strings, files, classes, polymorphism and more. Students are instructed to answer 5 full questions from the given options.

Uploaded by

Rakesh tirupathi
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
379 views

USN 18CS34: B. E. Degree (Autonomous) Third Semester End Examination (SEE)

This document contains a model question paper for a Python programming examination. It consists of 10 questions divided into 3 sections with a total of 100 marks. The questions cover various Python programming concepts like operators, data types, strings, files, classes, polymorphism and more. Students are instructed to answer 5 full questions from the given options.

Uploaded by

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

(Page 1 of 3)

USN 18CS34
B. E. Degree (Autonomous) Third Semester End Examination (SEE)

PYTHON PROGRAMMING
(Model Question Paper – I)

Time: 3 Hours] [Maximum Marks: 100


Instructions to students:
Answer FIVE FULL questions

RBT
Q.No. Questions Marks CO Cognitive
Level
Describe Arithmetic Operators, Assignment Operators,
a) Comparison Operators, Logical Operators and Bitwise 10 CO1 L2
Operators in detail with examples.
Explain the Identifiers, Keywords, Statements, Expressions,
1.
b) and Variables in Python programming language with 5 CO1 L2
examples.
Explain the basic data types available in Python with
c) 5 CO1 L2
examples.
OR
Write Python Program to reverse a number and also find the
a) Sum of digits in the reversed number. Prompt the user for 8 CO1 L3
input.
2. Write Pythonic code to check if a given year is a leap year or
b) 6 CO1 L3
not.
Write Python program to find the GCD of two positive
c) 6 CO1 L3
numbers.

Write Python code to determine whether the given string is a


a) 6 CO2 L3
Palindrome or not using slicing.
Explain the use of join() and split() string methods with
3. b) examples. Describe why strings are immutable with an 6 CO2 L2
example.
Write Python program to count the total number of vowels,
c) 8 CO2 L3
consonants and blanks in a String.
OR
4. a) Write Python program to add two matrices and also find the 7 CO3 L3
transpose of the resultant matrix.

Dr. Ambedkar Institute of Technology, Bengaluru – 560056


(An Autonomous Institution Affiliated to Visvesvaraya Technological University, Belgaum)
(Page 2 of 3)
Input five integers (+ve and −ve). Write Pythonic code to
find the sum of negative numbers, positive numbers and print
b) 7 CO3 L3
them. Also, find the average of all the numbers and numbers
above average.
Write Pythonic code to find Mean, Variance and Standard
c) 6 CO3 L3
Deviation for a list of numbers.

Discuss the relation between tuples and lists, tuples and


a) 8 CO3 L2
dictionaries in detail.
Write Python program to swap two numbers without using
5. b) 6 CO3 L3
Intermediate/Temporary variables. Prompt the user for input.
Write a program that accepts a sentence and calculate the
c) 6 CO3 L3
number of digits, uppercase and lowercase letters.
OR

Write Pythonic code to sort a sequence of names according


a) 8 CO3 L3
to their alphabetical order without using sort() function.
b) Discuss zip() function with an example. 6 CO3 L2
6.
Illustrate the following Set methods with an example.
c) a) intersection() b) union() c) issubset() d) difference() e) 6 CO3 L2
update() f) discard()

Discuss the following special characters in detail.


a) 7 CO4 L2
a) \d b) \w c) \b d) {m, n} e) \ f) ?
Consider the file structure given below. Write Python
program to delete all the files and subdirectories from the
Extinct_Animals Directory.
b) 6 CO4 L3
7.

Describe the difference between Python os and os.path


c) modules. Also, discuss the following methods of os module 7 CO4 L2
a) chdir() b) rmdir() c) walk() d) listdir() e) getcwd()
OR
8. a) Describe the characteristics of the CSV format. 7 CO4 L2
b) Write Python program to write the data given below to a 7 CO4 L3
CSV file.
Category,Winner,Film,Year
Best Picture,Doug Mitchell and George Miller,Mad Max:
Fury Road,2015
Visual Effects,Richard Stammers,X-Men:Days of Future
Past,2014
Best Picture,Martin Scorsese and Leonardo DiCaprio,The
Wolf of Wall Street,2013
Music(Original Song),Adele Adkins and Paul
Epworth,Skyfall from Skyfall,2012

Dr. Ambedkar Institute of Technology, Bengaluru – 560056


(An Autonomous Institution Affiliated to Visvesvaraya Technological University, Belgaum)
(Page 3 of 3)
Discuss the following methods of os.path module.
c) a) isfile() b) abspath() c) relpath() d) dirname() e) splitext() f) 6 CO4 L2
getmtime()

Write Python Program to Calculate Area and Perimeter of


a) 10 CO5 L3
different Shapes using Polymorphism.
9.
Illustrate the diamond problem in Python programming
b) 10 CO5 L2
language with an example.
OR
Write Python Program to Demonstrate the Construction of
a) 10 CO5 L3
Method Resolution Order in Python.
Consider a Rectangle Class and Create Two Rectangle
10.
Objects. Write Python program to Check Whether the Area
b) 10 CO5 L2
of the First Rectangle is Greater than Second by Overloading
> Operator.

******

Dr. Ambedkar Institute of Technology, Bengaluru – 560056


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

You might also like