This download link is referred from the post: GTU B.Tech 2020 Winter Question Papers || Gujarat Technological University
GUJARAT TECHNOLOGICAL UNIVERSITY
BE- SEMESTER-V (NEW) EXAMINATION - WINTER 2020
--- Content provided by FirstRanker.com ---
Subject Code:3152413 Date:01/02/2021Subject Name:Python Programming (Power Electronics)
Time:10:30 AM TO 12:30 PM Total Marks: 56
Instructions:
- Attempt any FOUR questions out of EIGHT questions.
- Make suitable assumptions wherever necessary.
- Figures to the right indicate full marks.
--- Content provided by FirstRanker.com ---
Q.1 (a) Give syntax of the methods which can be used to take input from the user in python program. | 03 |
(b) Explain iteration using while loop with example. | 04 |
(c) Draw the flowchart of conditional statement and explain if else statement with appropriate example. | 07 |
Q.2 (a) How do you define a function? What are the benefits of using function? | 03 |
(b) What is output of the following code? def function(x): print(x) x=45 y=34 print(y) X=3 y=4 function(x) print(x) print(y) | 04 |
(c) What is use of recursion in python programming? Write program that prompts user to enter nonnegative integer and display the factorial for the number using recursion. | 07 |
Q.3 (a) Explain list in python. | 03 |
(b) Give output of following python code: strl = "This is Pyhton" print ("Slice of String : ", strl[1 : 4 : 1]) print ("Slice of String : ", str1[0 : -1 : 2]) | 04 |
(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 python? | 04 |
(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 |
(c) What are bugs? What is debugging? What steps do you perform to identify and remove the bugs in a python script? | 07 |
Q.6 (a) Define testing and debugging. What is test suit with reference to testing? | 03 |
(b) Explain glass box testing with appropriate example | 04 |
(c) Which are commonly occurring type of exceptions? Explain value error exception handling with example. | 07 |
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, salary. Create suitable methods for reading and printing employee information. | 04 |
(c) Give difference between abstract class and interface in python using example. | 07 |
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 |
--- Content provided by FirstRanker.com ---
This download link is referred from the post: GTU B.Tech 2020 Winter Question Papers || Gujarat Technological University