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

Advanced Python

This document outlines the Diploma 3rd Semester Examination for Advanced Python Programming at Jharkhand University of Technology. It includes various questions on Python concepts, programming tasks, and theoretical explanations related to modules, packages, and exception handling. Students are required to answer five questions, with Question No. 1 being compulsory, and the exam is structured to assess both practical programming skills and theoretical knowledge.
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)
2 views2 pages

Advanced Python

This document outlines the Diploma 3rd Semester Examination for Advanced Python Programming at Jharkhand University of Technology. It includes various questions on Python concepts, programming tasks, and theoretical explanations related to modules, packages, and exception handling. Students are required to answer five questions, with Question No. 1 being compulsory, and the exam is structured to assess both practical programming skills and theoretical knowledge.
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

130425

301
CSE
Jharkhand University of Technology, Ranchi
Diploma 3rd Semester Examination, 2024 (NEP)
Subject : Advanced Python Programming Subject Code : CSE 301
Full Marks : 70
Time Allowed : 3 Hours

Answer in your oWn words.

Answer five questions in which Question No. I is compulsory.


The figures in the margin indicate full marks.
All guestions carry eyal marks.
2x7=14
1. Select the corect answer:
(i) Which operation is valid for Python scts?
(a) setl + set2 (b) setl | set2

(c) setl *set2


(d) setl** set?
fron a module?
(ü) Which of the following is the Correct way to import all names
(a) import module.t (b) Iromn module inciude
(d) import all fron module
(c) fronn module import *
to fill a shape with color)
(iii) In turtle graphics, which method is uscd
(a) fillO (b) begin_fillo
(d) start fillo
(c) color fill)
(iv) What is the purpose of py file in a package?
(b) To make the directory in a package
(a) To initialize the package
(d) To make the directory in a module
ic) To define functions within packages
values from a dictionary without their kevs?
(v) Which method would you use to get all
(b) [Link]()
(a) [Link])
(d) [Link]()
(c) [Link])
file in Python'?
(vi) What is the default node when opening a
(b) 'r
(a) w
(d) 'rh
in exception handling!
(vü) What is the primary purpose of the finally block
(a) To handle specific exceptions
(b) To execute code tht must run regurdless of CxceplioIIS
(C) Toraise exceptions
(d) To define custom exceplions
Please Turn Over
36477

1356
301 (2)
2./ () Write a Python progrun to fiut thc longest word in a list uf strings 7

th), What is object serialization'? Write a prvgram to serialize and leserialize a Python obieet
) Dtferentiate Ihetween built-in and Iser-defimed exceptions in Python Provide examnles for
hoth. 7

(b) Wrile a Python program that uses a try, except, and finally clause to handle a
ZerolDivisionErro.

4, (a) Explain the difference between a module and a package in Python. 7

(b) Explain the concept of intra-package references with an exanple. How does Python resolve
package imports? 7

5. (a) What is module search path? Explain with an example how Python searches for a module. 7
(b) Create a user-defined module nuncd calculator' with functions for basic arithmetic
operations. Demonstrate different ways to impurt and use this module in another Python
seript.
6. (a) Write a Python program to read a text file and count the numher of lines, words and7
characters in the file.

(b) Write a program using turtle gruphics to draw a colorful pattern using loops. The pattern
should include at least three different shapes with different colors.
3.5x4=14
KWrite short nores on any four:
1 (a PIP package manager and its importance
1hi Properties of dictionury keys and their constraints
s Python Set operations
(d) File handling modes and their applications
u Differences between text and hinary files

You might also like