This download link is referred from the post: GTU B.Tech 2020 Winter Question Papers || Gujarat Technological University
Enrolment No.
Subject Code: 3151108
--- Content provided by FirstRanker.com ---
GUJARAT TECHNOLOGICAL UNIVERSITY
BE- SEMESTER-V (NEW) EXAMINATION - WINTER 2020
Subject Name: Python Programming
Time: 10:30 AM TO 12:30 PM
Instructions:
--- Content provided by FirstRanker.com ---
1. Attempt any FOUR questions out of EIGHT questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
- (a) Briefly explain Data types and Variable in Python. [03]
(b) Write a program that calculates and prints the number of minutes in a year. [04]--- Content provided by FirstRanker.com ---
(c) Discuss following Python’s operators: Arithmetic, Assignment, Comparison, Logical with suitable examples. [07] - (a) What is The Structure and Behavior of a “while Loop” explain with example. [03]
(b) Write a program that accepts the lengths of three sides of a triangle as inputs. The program output should indicate whether or not the triangle is a right triangle. [04]
(c) Write a python script to Convert Decimal number to Binary number [07] - (a) Discuss Boolean Functions with examples. [03]
--- Content provided by FirstRanker.com ---
(b) Define a function named even. This function expects a number as an argument and returns True if the number is divisible by 2, or it returns False otherwise. [04]
(c) Write a Python function to calculate the factorial of a number (a non-negative integer). The function accepts the number as an argument [07] - (a) Discuss in brief python “Dictionaries” with example [03]
(b) Assume that the variable data refers to the dictionary {'b":20, 'a":35}. Write the values of the following expressions:
a. data['a'] b. data.get('c', None) c. len(data) d. data.keys() [04]--- Content provided by FirstRanker.com ---
(c) Write a Python function that checks whether a passed string is palindrome or not [07] - (a) Discuss common functions for accessing files [03]
(b) what are the differences between python and Micro python [04]
(c) Write a Python program to copy the contents of a file to another file [07] - (a) How to read CSV file ‘in python explain with example. [03]
--- Content provided by FirstRanker.com ---
(b) Discus the steps of Installation of MicroPython on Hardware [04]
(c) Write a python program to find the longest words in a read file. [07] - (a) Explain following fucntions of micropython:
1. wuart.read(5); 2. pwm0.freq(1000) 3. wlan.scan() [03]
(b) Write a micropython script to Blink led pin connected to GPIO digital pin 1 to 4 of ESP8266 continuously. [04]--- Content provided by FirstRanker.com ---
(c) Write a micropython script to read PIR sensor data for an ESP8266. If value is high print “Motion detected” otherwise print “Motion Stopped”. [07] - (a) Explain steps in micropython to connect esp module’s wifi. [03]
(b) Write a micro python program: if Button is Connected with Pin number 1 of ESP8266. When button is pressed toggle the leds connected to pin number 2 and 3. [04]
(c) Write a micropython script to read and print DHT Sensor data for ESP8266 continuously. [07]
Date: 22/01/2021
--- Content provided by FirstRanker.com ---
Total Marks: 56--- Content provided by FirstRanker.com ---
This download link is referred from the post: GTU B.Tech 2020 Winter Question Papers || Gujarat Technological University