0% found this document useful (0 votes)
11 views

imp py

Uploaded by

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

imp py

Uploaded by

zakeedadu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Ch 1: Introduction, Data Types, and Operators

1. Q.1 (a) Briefly explain Data types and Variable in Python.


2. Q.1 (b) Write a program that calculates and prints the number of minutes in a year.
3. Q.1 (c) Discuss the following Python’s operators: Arithmetic, Assignment, Comparison, Logical with
suitable examples.
4. Q.1 (a) Briefly explain Data types and Variable in Python.
5. Q.1 (b) Write a program that calculates and prints the number of minutes in a year.
6. Q.1 (c) Discuss the following Python’s operators: Arithmetic, Assignment, Comparison, Logical with
suitable examples.
7. Q.1 (a) Differentiate list and tuples.
8. Q.1 (b) Develop a Python program to print even numbers in a list.
9. Q.1 (c) Explain and categorize operators in Python.

Ch 2: Python Decision Making and Loops

1. Q.2 (a) What is the Structure and Behavior of a “while Loop”? Explain with an example.
2. Q.2 (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.
3. Q.2 (c) Write a python script to Convert Decimal number to Binary number.
4. Q.3 (a) Discuss Boolean Functions with examples.
5. Q.2 (a) What is the Structure and Behavior of a “while Loop”? Explain with an example.
6. Q.2 (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.
7. Q.2 (c) Write a python script to Convert Decimal number to Binary number.
8. Q.3 (a) Discuss Boolean Functions with examples.
9. Q.3 (a) Explain for loop in detail.

Q.3 (b) Develop a Python program to construct the following pattern:


markdown
Copy code
*
* *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*

10.
11. Q.3 (c) Make use of if, if..else, if..elif..else, and nested if.
OR
12. Q.3 (a) Explain while loop in detail.
13. Q.3 (b) Develop a Python program to print the factorial of a number.
14. Q.3 (c) Explain the working of break, continue, and pass statements.

Ch 3: Python Functions and Modules

1. Q.3 (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.
2. Q.3 (c) Write a Python function to calculate the factorial of a number (a nonnegative integer). The
function accepts the number as an argument.
3. Q.4 (a) Discuss in brief python “Dictionaries” with examples.
4. Q.4 (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()
5. Q.4 (c) Write a Python function that checks whether a passed string is palindrome or not.
6. Q.3 (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.
7. Q.3 (c) Write a Python function to calculate the factorial of a number (a nonnegative integer). The
function accepts the number as an argument.
8. Q.4 (a) Discuss in brief python “Dictionaries” with examples.
9. Q.4 (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()
10. Q.4 (c) Write a Python function that checks whether a passed string is palindrome or not.
11. Q.4 (a) Differentiate actual and formal arguments.
12. Q.4 (b) Develop a Python program to display the Fibonacci sequence using the recursion method.
13. Q.4 (c) Develop a Python program that converts decimal to binary, decimal to octal, and decimal to
hexadecimal numbers using user-defined functions.
OR
14. Q.4 (a) Define SCOPE, and discuss global and local variables in detail.
15. Q.4 (b) Define Lambda function, and utilize it in an example.
16. Q.4 (c) Develop a Python program to find the maximum, minimum, and average of given numbers
using user-defined functions.

Ch 4: Python File Operations

1. Q.5 (a) Discuss common functions for accessing files.


2. Q.5 (c) Write a Python program to copy the contents of a file to another file.
3. Q.6 (a) How to read CSV file in Python? Explain with an example.
4. Q.6 (c) Write a python program to find the longest words in a read file.
5. Q.5 (a) Discuss common functions for accessing files.
6. Q.5 (c) Write a Python program to copy the contents of a file to another file.
7. Q.6 (a) How to read CSV file in Python? Explain with an example.
8. Q.6 (c) Write a python program to find the longest words in a read file.
9. Q.5 (b) Develop a Python program that reads and prints the first n lines from an existing file and also
creates a new file that contains the first n lines from the existing file.
10. Q.5 (c) Explain Exception handling in detail.
OR
11. Q.5 (a) Enlist modes of file operations in Python.
12. Q.5 (c) Develop a Python program to create a CSV file that contains five entries along with a header
(serial number, name, birth date, and city).

Ch 5: MicroPython

1. Q.5 (b) What are the differences between Python and MicroPython?
2. Q.6 (b) Discuss the steps of Installation of MicroPython on Hardware.
3. Q.7 (a) Explain the following functions of MicroPython:
3. uart.read(5)
4. pwm0.freq(1000)
5. wlan.scan()
4. Q.7 (b) Write a MicroPython script to blink the LED pin connected to GPIO digital pins 1 to 4 of
ESP8266 continuously.
5. Q.7 (c) Write a MicroPython script to read PIR sensor data for an ESP8266. If the value is high, print
“Motion detected”; otherwise, print “Motion Stopped.”
6. Q.8 (a) Explain steps in MicroPython to connect ESP module’s WiFi.
7. Q.8 (b) Write a MicroPython program: if Button is Connected with Pin number 1 of ESP8266, when
the button is pressed, toggle the LEDs connected to pins 2 and 3.
8. Q.8 (c) Write a MicroPython script to read and print DHT Sensor data for ESP8266 continuously.
9. Q.5 (b) What are the differences between Python and MicroPython?
10. Q.6 (b) Discuss the steps of Installation of MicroPython on Hardware.
11. Q.7 (a) Explain the following functions of MicroPython:
3. uart.read(5)
4. pwm0.freq(1000)
5. wlan.scan()
12. Q.7 (b) Write a MicroPython script to blink the LED pin connected to GPIO digital pins 1 to 4 of
ESP8266 continuously.
13. Q.7 (c) Write a MicroPython script to read PIR sensor data for an ESP8266. If the value is high, print
“Motion detected”; otherwise, print “Motion Stopped.”
14. Q.8 (a) Explain steps in MicroPython to connect ESP module’s WiFi.
15. Q.8 (b) Write a MicroPython program: if Button is Connected with Pin number 1 of ESP8266, when
the button is pressed, toggle the LEDs connected to pins 2 and 3.
16. Q.8 (c) Write a MicroPython script to read and print DHT Sensor data for ESP8266 continuously.
17. Q.5 (a) Define MicroPython, and explain its features.
OR
18. Q.5 (b) Develop a program in MicroPython to send digital data to a GPIO pin of a
MicroPython-supported board and blink an LED connected to it

Ch 2 and Ch 3 Combined (Decision Making, Loops, and Functions)


1. Q.2 (a) Explain dictionary in detail.
2. Q.2 (b) Develop a Python program to count occurrences of an element in a list.
3. Q.2 (c) Explain various features of a plot in Python.
OR
4. Q.2 (c) Develop a Python program that creates a matrix graph using subplot with the following
plots:
1. Linear plot
2. Scatter plot
3. Histogram
4. Bar chart
19.

You might also like