Be Summer 2021

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Seat No.: ________ Enrolment No.

___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–V (NEW) EXAMINATION – SUMMER 2021
Subject Code:3151108 Date:07/09/2021
Subject Name:Python Programming
Time:10:30 AM TO 01:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.
MARKS
Q.1 (a) Describe merits and demerits of python over other language. 03
(b) Write Python code to find and print first n- Fibonacci numbers. 04
(c) Describe mathematical and logical operators in python. 07

Q.2 (a) What is difference between list and tuple. 03


(b) Describe elsif ladder structure and nested if..else.. statement. 04
(c) Write Python code to print following pattern using nested loop. 07
*
**
***
****
** ***
OR
(c) Write Python code to find average, Maximum and Minimum of 07
marks obtained by students for Engineering Drawing subject
(class size : 60)

Q.3 (a) Describe dictionary example in python. How to access individual 03


members?
(b) Describe user defined function in python. 04
(c) Write a python program to read data from “file1.csv”, if data is 07
negative write it in “negative.csv” and if data is positive write it
in “positive.csv”
OR
Q.3 (a) Describe concept of “set” in python. How to access individual 03
members of set?
(b) Describe file handling functions in python. 04
(c) Write a program to print the same python program using file 07
handling.

Q.4 (a) Describe with example : Module in python 03


(b) Describe break, continue, pass statement with example 04
(c) Write a python function to convert string into upper case and find 07
length of string. String will be passed to function from main
program print both the return value in main program..
OR
Q.4 (a) Describe range function with example. 03
(b) Describe exception handling with example. 04
(c) Write a program to plot 07
(1) sin wave

1
(2) cosine wave
(3) y = x2 + 2x + 1
range of -5 to 5 on (A) separate plot (B) same plot.
Put axes label and plot title for both plots.

Q.5 (a) Describe features of python which are not supported by 03


MicroPython.
(b) Differentiate: Python and MicroPython. 04
(c) Write MicroPython program to blink LED at 1 sec on GPIO pin 07
OR
Q.5 (a) Enlist various IDE available to program MicroPython program. 03
(b) Describe features of MicroPython 04
(c) Write MicroPython program to read proximity sensor connected 07
at Pin1, blink the LED if sensing is detected.

*************

You might also like