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

Python Programming Assessment Paper

Python questions that helps you for the competitive exams.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Python Programming Assessment Paper

Python questions that helps you for the competitive exams.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

PUDCUHERRY TECHNOLOGICAL UNIVERSITY


Continuous Internal Assessment Test III Question paper Bachelor of Technology(Computer Science and Engineering)
II Year III Semester CSUC107 Python Programming held on 11.11.2025
Time: 1.5 Hours Answer ALL Questions Maximum:25 Marks
PART – A (2x5=10 marks) ANSWER ANY 5 QUESTIONS
Answer any two *questions are to be answered compulsorily
Course Outcomes Blooms
[Link]. Question Marks (C01/C02/C03/C04/C05/ Taxonomy
Combinations) levels
Write a Python class named Student with attributes name and 2 CO4 L3
01
age. Create one object of this class.
Explain how inheritance helps in code reusability with a simple 2 CO4 L3
02* Python example.

Given a base class Animal and a derived class Dog, show how 2 CO4 L3
03* the derived class can call the constructor of the base class
using super()
2 CO4 L2
04 Does self and this pointer in c++ serve the same purpose?

Illustrate the difference between class variable and instance 2 CO4 L3


06
varibale

Illustrate the use of str method,default constructor and 2 CO4 L2


07
parameterized constructors

08 ___________ is the process of converting structures to byte 2 CO5 L1


stream before writing to file
09 List the different file access modes 2 CO5 L1
PART – B (Answer any two questions from three questions 15marks
Course Blo
M Outcomes o
a (C01/C02/ m
r C03/ s
k C04/C05/ Tax
Sl s Combinat o
Question
ions) n
m
y
leve
l
s
Build a class ShoppingCart where 5 CO4 L3,
items can be added or removed, L
4
store purchase made by the
[Link] a the total bill
including GST details . Include a
constructor, appropriate instance
variables, and methods for each
01 operation.
Write a function to add points to the
customer base don the purchase
they do.
Example
Points 10 for purchase greater than 3000.
Points 20 for purchase greater than 5000.
Points 30 for purchase greater than 7000.
Points 40 for purchase greater than 9000.
Write a program for a banking 05 CO4 L3,
enterprise Create necessary classes L
4
to maintain account,customer and
02
branch details Write a function
InsufficientFundsException to
handle withdrawals. Throw a user-
1
defined exception if the withdrawal
amount exceeds the balance.
Demonstrate exception handling in
the main class.
Write a python program to create a file to 05 CO5 L3,
store the students of section a in one file L
named sec-a-stud and the student details of 4
section b in sec-b-stud. Create a file
combining the data of both sections.
03 Display the number of students who have
the same name and how many girl
students and male students are there put
together

Write a program to store movie related 05 CO5 L3,


information in a file . Write functions to L
answer the following queries. 4
1. Total number of films acted by an
04
actor/actress
2. List the actors/actress of the
movie
3. Total of films in each genre
05 CO4 L3,
L
4

05 What is the output of this


moomoo = Cow("MooMoo", 20)
print(str([Link]()) +
moomoo.__name)
What is the output of this
moomoo = Cow("MooMoo", 20)
milks = [Link](10)
if milks < 10:
print("Not much milk...")
else:
print("Tons of milk!")
What is the output of this?
moomoo = Cow("MooMoo", 20)
elsie = Cow("Elsie", 25)
print(moomoo == elsie, moomoo <
elsie, moomoo > elsie)

You might also like