List some commonly used MicroPython libraries and explain the purpose of any three of them.
[3 marks]Using the DHT11 sensor, write a MicroPython program to read temperature and humidity every 5 seconds and print the values to the serial monitor. Add logic to turn ON the LED if the temperature exceeds 30°Cand turn it OFF otherwise.
[4 marks]Explain what MicroPython is and discuss its key features that make it suitable for microcontroller-based projects. Give comparison of MicroPython and standard Python in terms of features, memory usage, performance, and supported libraries.
[7 marks]Define what a variable is in Python and explain the rules for naming variables.
[3 marks]Write a python code to create a list of integers and perform operations like append(), insert(), remove(), sort(), and reverse().
[4 marks]Write a python program to create two integer variables and demonstrate various arithmetic operation like addition, subtraction, multiplication, division, floor division, modulus, and exponentiation. Write the output of the program.
[7 marks]Write a python program to demonstrate the various comparison operator and logical operator. show the output of the program.
[7 marks]Write a program using a for loop to display the multiplication table of a number entered by the user.
[3 marks]Explain the function of Break, Pass and Continue statement in python using suitable example.
[4 marks]Write a Python program that uses external modules datetime, math, random to Display the current date and time, Generate a random number between 1 and 100, Calculate the square root and factorial of a number. Organize the code using custom functions for each task.
[7 marks]Write a program using a while loop to print the sum of natural numbers up to n.
[3 marks]Differentiate between for loop and while loop. When is it preferred over a for loop? Page 1 of
[2 marks]Why is data visualization important in Python programming? What is Matplotlib and how is it used for plotting data? Explain withe the help of suitable example.
[7 marks]What is Inheritance? Write a Python program to demonstrate single inheritance by creating a Person class and a derived Student class that inherits from Person.
[3 marks]Discuss the steps to create a custom module in Python. How can it be imported and used in another program? Provide syntax and an example.
[4 marks]Explain Encapsulation and Data Hiding in Python. Why are they important in OOP? Illustrate with a program where some class attributes are made private, and access to them is controlled using methods.
[7 marks]What is global variable and local variable? Explain their difference with the help of suitable python code.
[3 marks]Explain the steps for opening, reading, writing, and closing a file in Python. Write a short program that appends new content to an existing text file.
[4 marks]Write a Python program to read data from a CSV file, calculate some statistics (e.g., average marks of students), and write the results into another CSV file. Include proper exception handling.
[7 marks]Differentiate between list and tuple in Python.
[3 marks]Write a Python program to demonstrate list slicing. Given a list of numbers, print: First 3 elements, Last 3 elements, Every alternate element.
[4 marks]Explain various string methods in Python with suitable examples for following methods. find(), replace(), split(), join(), strip(), startswith(), endswith().
[7 marks]Write a short note on: Dictionaries and their basic operations
[3 marks]What are nested lists? How can they be created, accessed, and modified? Explain with a suitable example.
[4 marks]Explain the role of regular expressions in advanced string manipulation. Mention common regex functions and provide examples. Page 2 of
[2 marks]