NPTEL Introduction To Internet Of Things Week 6 Assignment Answers 2025
1. State True or False.
Statement: “Python is popular for embedded application development as it is a very lightweight programming language.”
a. True
b. False
Answer :- For Answers Click Here
2. State True or False.
Adafruit provides a library to work with DHT22 Sensor.
a. True
b. False
Answer :-
3. Consider the following piece of Python code. What is the output?
x = [4, 5, 6] y = [str(x[0] + 1), str(len(x) * 2) + ‘&Code’] z = y[1].split(‘&’) print(z[1])
a) 5
b) 12
c) Code
d) &Code
Answer :-
4. State True or False.
Statement: “To indicate different blocks of code, Python follows rigid indentation.”
a. True
b. False
Answer :-
5. What is the output of the following line of code in Python?
>>> print “Hi, Welcome to python!”
a. Hi, Welcome to python!
b. “Hi, Welcome to python!”
c. Hi, Welcome to python
d. None of these
Answer :- For Answers Click Here
6. During remote server access by a Raspberry Pi, where the Raspberry Pi acts as a client, the client needs the following?
a. Only IP address of server
b. Only port number
c. Both server IP address and port number
d. Client’s IP address
Answer :-
7. State whether the following command to install the PIL library is correct or not.
sudo pip install pillow
a. Correct
b. Incorrect
Answer :-
8. What is the purpose of the “w” mode in the open() function in Python?
A) To read a file
B) To write data to a file, overwriting existing content
C) To append data to a file
D) To open a file in read and write mode
Answer :-
9. What will be the output of the given Python program when reading from the file?
with open(“PythonProgram.txt”, “w”) as file: file.write(“Writing data”) with open(“PythonProgram.txt”, “r”) as file: f = file.read() print(‘Reading from the file\n’) print(f)
A) Writing data
B) Reading from the file
Writing data
C) Error: File not found
D) None of the above
Answer :-
10. Can we configure Raspberry Pi as a File Server?
a. Yes
b. No
Answer :- For Answers Click Here
11. Which command is used to configure the Raspberry Pi for the camera module?
A) sudo camera-config
B) sudo raspi-config
C) sudo enable-camera
D) sudo pi-setup
Answer :-
12. What is the final step after enabling the camera in the Raspberry Pi configuration?
A) Restart the camera service
B) Run a camera test command
C) Reboot the Raspberry Pi
D) Reinstall the Raspberry Pi OS
Answer :-
13. Which command Exits the nano editor?
a. Ctrl + X
b. Ctrl + O
c. Ctrl + K
d. None of these
Answer :-
14. In a temperature-controlled fan system using a relay, when should the fan turn on?
A) When the relay is manually triggered
B) When the surrounding temperature is lower than a predefined threshold
C) When the surrounding temperature exceeds a predefined threshold
D) When the battery voltage drops below a certain level
Answer :-
15. What does the following line of code do?
raspistillcapture -o image.jpg
a. Captures video feed
b. Captures still image
c. Both (a) and (b)
d. None of these
Answer :- For Answers Click Here