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

Python Previous Year QP

Python vtu

Uploaded by

Aniket Redekar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
7 views

Python Previous Year QP

Python vtu

Uploaded by

Aniket Redekar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 2
CECSIS CHEN E ae C _BPECKB105/BPLCK105B ‘Time: 3 hrs. First Semester B.E/B.Tech Degree Examination, June/July 2023 Introduction to Python Programming < v Max. Marks: 100 Note: I. Answer any FIVE full questions, chodsing ONE full question from each module, 2M: Marks L: Bloom's level , Ct Coltrge outcomes. Ba, Module—1 5 MIL € a] List and explain math operators uséd in Python with example 7 | £2 | Cor bi] Write a Python program to check whether the number feven or add. | @ [3 | COI - 7 [a2 [Cor 6) Li | cor i input 8 | 11 | Cor eT ahs range )- 6 | 13 | Cor As so, An? = Module’ 2. 2.2 - [Explain te follwing Ts methods ety examples. gS 102 | coz sindex( ye“ é , sappend( 3%” ee Oo AP ky me) ¢ Ae Write a python program to create a ay giiary of 10 key-value pairs and | 5 | 13 | CO2 print only keys 6n,the screen. Explain in and) Hot in operators Used in lists with an example. | |ia [coz ; wy ie : OR 7 ‘Show that lists are mutable, 6 | L1 | Coz Write @ program™lo count the ffequency of characters using module | 8 [L2 | CO2 PPrint(Pretty Printing). Explain raridom.choice and random.shuffle functions with lists. 6 | LI | co2 1of2 BPLCKBIOS/BPLCK ig, Module~3, f - Om] Write the outpat of folowing Pyihon code >>>Spam= allo, World™ © [Lt | toy i)>>>Spam{0] ii) >>Spam[4] >>>Spam{-1] ~ y iv) Spam{0:5] v)>>> Spam [5] vi) >>>Spam{7 JX” B. | Write a program to accept string and display ofaljpuinber oF alphabets. 6 as «. | Explain how to save variables with the Shelvemodule. 8 [Lt | Cor OR. > Q6 [a. | Explain the following string methods with examples : A 10 | L1 | Cos i) salphac) i) salnum() iy isdeimal) iv) sspace() v) iste). > i. | Write-@ Python program that repeatedly asks users Tor thelr age and al 6 | L3 | COs Password until they provide valid input. (age is in digit’and Password in alphabet an digit only].¢ >? «. | Differentiate between Absolute and relative paths in specifying file paths. | 4 | L2 | Coy Module=4 Q7 | a. | Show that files anid folders ean be copied using Shutil module. 8 [LI | Cor b. | Write afte n Raising exceptions in Python. 7 [Li | Cor PG «. | Explaifive buttons available inthe Debug Control Hindow. 3 [L2 | com OR at QB [a | Describe Togging levels used in Python toveategorize log messages by | 10 [L2 ] Cod importance. a 7 1. | With example slow ow files and folders can be permanently deleted. 10 | Lr [Cor Ay AN Module~5 Q9 ]a | Write a program to implement the following object diagram and its]10]L3 | COs fiunetionflity as shown in Fig.9(a). Initialize the attributes through a cofisttuetor and print the Game. ; QHa) b. | Discuss operator overloading. Mention any five operators wi ‘ith res special functions to,be Overloaded in Python, spective | 10 | L2 | Cod aren OR Q.10 [a. | Explain the following wih an example Z Tuco i) isintance() i) hasat i) eopy.copy iv) copy.deepeopy(). b. | Write a program to expla oti i 5 [| Wai Brogra plain pure function and modifier function, 7 [Es | C04 a TRE Y : 2of2

You might also like