Introduction To Internet Of Things Week 6 NPTEL Assignment Answers 2025

NPTEL Introduction To Internet Of Things Week 6 Assignment Answers 2024

1. Python can only be used to build small applications.

a. True
b. False ✅
Answer: b. False
Explanation: Python is a versatile language used to build small scripts as well as large-scale applications like web platforms, machine learning systems, and enterprise-level software.


2. Which of the following is NOT a Python IDE?

a. Spyder
b. PyCharm
c. Both (a) and (b)
d. None of these ✅
Answer: d. None of these
Explanation: Both Spyder and PyCharm are widely used Python IDEs. Hence, none of the options listed is not a Python IDE.


3. To indicate different blocks of code, Python follows rigid indentation.

a. False
b. True ✅
Answer: b. True
Explanation: Python uses indentation strictly to define code blocks, unlike other languages that use curly braces.


4. Which of the following is not a data-type in Python?

a. List
b. Branch ✅
c. Tuple
d. None of these
Answer: b. Branch
Explanation: ‘Branch’ is not a Python data type. List and Tuple are valid built-in data types.


5. Python allows us to read and write files.

a. True ✅
b. False
Answer: a. True
Explanation: Python provides built-in functions like open(), read(), and write() to handle file operations.


6. Which of the following is NOT a mode to open a file?

a. Read mode
b. Write mode
c. Append mode
d. None of these ✅
Answer: d. None of these
Explanation: All options listed are valid file open modes in Python (r, w, a). So, none is incorrect.


7. Is the following Linux command correct to install the PIL library?

sudo pip install pillow
a. Correct ✅
b. Incorrect
Answer: a. Correct
Explanation: Pillow is the fork of the original PIL library. This command correctly installs it using pip.


8. Is the following syntax correct for creating a socket in Python?

s = socket.socket(socket_family, socket_type, protocol=0)
a. Correct ✅
b. Incorrect
Answer: a. Correct
Explanation: This is the correct syntax for creating a socket using Python’s socket module.


9. What is a Raspberry Pi?

a. A computer on your palm
b. Single board computer
c. Low cost
d. All of these ✅
Answer: d. All of these
Explanation: Raspberry Pi is a low-cost, single-board computer that fits in the palm of your hand.


10. What is required for a basic setup of Raspberry Pi?

a. Monitor
b. Keyboard
c. Mouse
d. All of these ✅
Answer: d. All of these
Explanation: A basic setup of Raspberry Pi typically includes a monitor, keyboard, and mouse to operate it.


11. Which keyboard shortcut saves the file in the nano editor?

a. Ctrl+O ✅
b. Ctrl+X
c. Both (a) and (b)
d. None of these
Answer: a. Ctrl+O
Explanation: Ctrl+O is used to write (save) the file in nano. Ctrl+X is for exiting the editor.


12. A relay module for Raspberry Pi has how many terminals?

a. 3 ✅
b. 2
c. 4
d. 5
Answer: a. 3
Explanation: Most basic relay modules have 3 terminals: VCC, GND, and IN (signal pin).


13. Does Adafruit provide a library for the DHT22 sensor?

a. True ✅
b. False
Answer: a. True
Explanation: Adafruit provides a Python library to interface with DHT sensors like DHT11 and DHT22.


14. What is the function of close() in file handling?

a. This function does not exist in python
b. It closes the current connection to the file and ensures it is free ✅
c. None of these
d. Both (a) and (b)
Answer: b.
Explanation: The close() method safely closes an open file and releases the resource.


15. Where is the Raspbian image found?

a. It is not available on the Internet
b. It is available as an image file from the Raspberry Pi official website ✅
c. It can only be purchased from an offline vendor
d. None of these
Answer: b.
Explanation: Raspbian (now Raspberry Pi OS) is available as a free image download from the Raspberry Pi official website.