Download GTU B.Tech 2020 Winter 5th Sem 3152413 Python Programming (Power Electronics) Question Paper

Download GTU (Gujarat Technological University Ahmedabad) B.Tech/BE (Bachelor of Technology/ Bachelor of Engineering) 2020 Winter 5th Sem 3152413 Python Programming (Power Electronics) Previous Question Paper

Seat No.: ________
Enrolment No.___________
GUJARAT TECHNOLOGICAL UNIVERSITY
BE- SEMESTER?V (NEW) EXAMINATION ? WINTER 2020
Subject Code:3152413 Date:01/02/2021
Subject Name:Python Programming (Power Electronics)
Time:10:30 AM TO 12:30 PM Total Marks: 56
Instructions:
1. Attempt any FOUR questions out of EIGHT questions.

2. Make suitable assumptions wherever necessary.

3. Figures to the right indicate full marks.



MARKS
Q.1 (a) Give syntax of the methods which can be used to take input from the
03
user in python program.

(b) Explain iteration using while loop with example.
04

(c) Draw the flowchart of conditional statement and explain if else
07
statement with appropriate example.


Q.2 (a) How do you define a function? What are the benefits of using
03
function?

(b) What is output of the following code?
04
def function(x):
print(x)
x = 4.5
y = 3.4
print(y)
x = 5
y = 4
function(x)
print(x)
print(y)

(c) What is use of recursion in python programming? Write program that
07
prompts user to enter nonnegative integer and display the factorial for
the number using recursion.




Q.3 (a) Explain list in python.
03

(b) Give output of following python code:
04
str1 = "This is Pyhton"
print ("Slice of String : ", str1[1 : 4 : 1])
print ("Slice of String : ", str1[0 : -1 : 2])

(c) Explain Dictionaries with example.
07




Q.4 (a) Explain slicing operator in list with example.
03

(b) How append() and extend() are different with reference to list in
04
python?

(c) Explain Tuples in python with example.
07



Q.5 (a) Explain Exception handling in python.
03

(b) Explain black box testing with appropriate example.
04
1


(c) What are bugs? Write about different types of bugs. What steps will
07
you perform to identify and remove the bugs in a python script?


Q.6 (a) Define testing and debugging. What is test suit with reference to
03
testing?

(b) Explain glass box testing with appropriate example
04

(c) Which are commonly occurring type of exceptions? Explain value
07
error exception handling with example.



Q.7 (a) Give syntax used for labeling of title and all axes in plotting graph.
03

(b) Create a class Employee with data members: name, department,
04
salary. Create suitable methods for reading and printing employee
information.

(c) Give difference between abstract class and interface in python using
07
example.



Q.8 (a) Explain basic idea behind hash table with suitable example.
03
(b) Write a python program to implement multiple Inheritance.
04
(c) Write a python program to implement merge sort.
07

*************
2

This post was last modified on 04 March 2021