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

Python Previous Year Question Paper 2

Python vtu

Uploaded by

Aniket Redekar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
387 views2 pages

Python Previous Year Question Paper 2

Python vtu

Uploaded by

Aniket Redekar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 2
GHGS SenshE /B.Tech. Degree Examigin(ion, Jan./Feb. 2023 Introduction t a usw 2) rir] oR y First Semester B. BELCK105B/BPLCKB105 Be 0 Python Programming Time: 3 hrs, ns “Max. Marks: 100 Note: 1. Answer any FIVE. IPPON, E full questions, choosth; Me ich module. 2M Mts Lc tom’ tot ofl men a - Moduld oi, ” M| 1 Qt [a | What is the need Tor role oF Precedagce? Mlustrate the rules of precedence | 6 | L2 | COL in Python with example. “aly fi » | Explain the focal and global scdpe Wir saiebie examples, © |tz]cor }* | Develop a program to Generate Fibonacci sequence of length (N). Read N[® [L3 | COL from the console, ; on 3 Q2 a. | What are functions? Explain Python funelion with parameters and return Statements, a L2] COI Define exception handlin “ 1g. How exceptiotis,are handled in python? Write a| 7 |L2 | COL Program) t6'solve divide by zero exception, ” ©. | Develop a python Program to Galgulate the area of rectangle and triangle | 6 | L3 | COI print the result. co? “ % Medule-2 Q3 | a. | Explain negative indexing, ‘slicing, index( ), appénd( ), remove(.), insert( ) and sort( ) with’suitable example. a” Ln —| pop(), | 8 | L2 [coz b. Explain the use of in and notin operafors.indist with suitable examples 6 |L2 | coz ¢. | Develop aprogram to find mean, v§flande and standard Geviltion- 6 |t3 [coz 240R_ 7 Q4 [a. ] Explain following method iW iss withan expe: 8 | La] coz iyleng) ii) sum() it) max() iv) ming). oy 3 b. Expiin se Yand sede) method ineRsionary. © [12 }co2 c Develop a Python program to swap casg afk given sing 6 |L3 | co input: Java he, output: jAVA. » * Mee ey, éModule —3 QS Ta. | Explain join( ) and split) method with examples. 8 | L2] cos b. | Explain with examples:,j) isalpha) ii) isalnum() iii) isspace( ). 6 |L2 [Cos ¢. [Develop a python’ code to determine whether the given string is al6 [L3 | cos palindrome or not a palindrome. — oR — Q6 [a PExpiain the concept of file hnndting, Also oxplaln res Process with suitable example, | Explai-the conssprot ie path, Aiko douse absotute wid relative Me path, | Briefly expiain saving variables with shelve module,» Mouie—4 : Q7 a. TEN the Tolfowing fife operations In Pyjon with suitable example: 1) Copying fites and folders em” 4) Moving files and folders ea fii) Permanently deleting files andy folders. Tile? Also expan reading oF Wzip He | 8 TLE] Sop b. | List out the benefits of compressl with an example, . e [List out the differences etween sl 6 | L3 | Cos] a method, OR Qs Briefly explain assertions and raising a ex 6 | L2 7 Cor b. | List out the benefits of using logging module with an example. © [tz }cor «| Deyelop"a program with a Auction named DivExp which takes wo}8 |L3 | coy paflfiers a, b and returns a valti@C (C = wb), Write suitable assertion for > 0 in function DivExp and raise dn exception for wheh b = 0. Develop a suitable program which reads two values from ‘théconsole and calls a function DivExp. & Module =5 ae Q9 a. | Define a class and,object, construct the élds9 called rectangle and tnitialize | & L2 [coe it with height = 100} width = 200, sug point as (x=, y= 0), Write a program togdisplay the center pointco;0Rtinates ofa rectal, Ne ‘ X 4 b. Explain the’oncept of copying lising copy module with an example. 6 |L2 {Cos wee isi e Ep the concept oF i % tafice with an example, 6 [12 | Cos ORS. . tion of two complex numbers, Define a suitable“class ‘Compléx’ to represent the complex number. Develop a ohram to read N(N' ='2) complex numbers and to compute Q107 Define a function'Wwhich takes two objetts representing complex numbers | 8 | L2 | COd and returns newcomplex number witha adit the additigiPoFN complex numbers, b. | Explain (and \<_str__() method with examples, 6 | L2 | COs 6. Briefly explain the prinfing oF objects with an examples © | 2 | Cos at 20f2 “Bp, %y & 2

You might also like