Introduction To Internet Of Things Week 6

Session: JAN-APR 2024

Course Name: Introduction To Internet Of Things

Course Link: Click Here

For answers or latest updates join our telegram channel: Click here to join

These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q1. Python can only be used to build small applications.
a. True
b. False

Answer: b. False


Q2. Which of the following is NOT a Python IDE?
a. Spyder
b. PyCharm
c. Both (a) and (b)
d. None of these

Answer: c. Both (a) and (b)


Q3. State whether the following statement is true or false.
Statement: To indicate different blocks of code, python follows rigid indention.

a. False
b. True

Answer: b. True


For answers or latest updates join our telegram channel: Click here to join

These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q4. Which of the following is not a data-type in Python?
a. List
b. Branch
c. Tuple
d. None of these

Answer: b. Branch


Q5. State whether the following statement is true or false.
Statement: Python allows us to read and write files.

a. True
b. False

Answer: a. True


Q6. 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


For answers or latest updates join our telegram channel: Click here to join

These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q7. State whether the following command to install the PIL library in Linux is correct or not.
sudo pip install pillow

a. Correct
b. Incorrect

Answer: a. Correct


Q8. State whether the following statement is correct for creating a socket ‘s’ in python.
s = socket.socket(socket_family, socket_type, protocol=0)

a. Correct
b. Incorrect

Answer: a. Correct


Q9. 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


For answers or latest updates join our telegram channel: Click here to join

These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q10. Which of the following are required for a basic set up of Raspberry Pi?
a. Monitor
b. Keyboard
c. Mouse
d. All of these

Answer: d. All of these


Q11. Which of the following keyboard key combination writes (i.e saves) the code to the file in nano editor?
a. Ctrl+O
b. Ctrl+X
c. Both (a) and (b)
d. None of these

Answer: a. Ctrl+O


Q12. A relay module for Raspberry Pi has how many terminals?
a. 3
b. 2
c. 4
d. 5

Answer: a. 3


For answers or latest updates join our telegram channel: Click here to join

These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q13. State whether the following statement is true or false.
Statement: Adafruit provides a library to work with the DHT22 sensor.

a. True
b. False

Answer: a. True


Q14. What is the function of the close() function in python programming while handling files.
a. This function does not exist in python
b. It closes the current connection to the file and ensures that the file is free to use for other resources
c. None of these
d. Both (a) and (b)

Answer: b. It closes the current connection to the file and ensures that the file is free to use for other resources


Q15. Where is the Raspbian image found?
a. It is not available on the Internet
b. It is available as image file from the Raspberry Pi official website
c. It can only be purchased from offline vendor
d. None of these

Answer: b. It is available as image file from the Raspberry Pi official website


For answers or latest updates join our telegram channel: Click here to join

These are Introduction To Internet Of Things Week 6 Assignment 6 Answers

More Weeks of Introduction To Internet Of Things: Click here

More Nptel Courses: Click here


Session: JULY-DEC 2023

Course Name: Introduction To Internet Of Things

Course Link: Click Here

These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q1. Python doesn’t support strict rules for syntax and static variable declaration like C
a. True
b. False

Answer: a. True


Q2. Fill in the blanks. __ is a data-type in Python.
a. List
b. Tuple
c. Dictionary
d. All of these

Answer: d. All of these


Q3. Fill in the blanks. __________are the variables declared inside a function.
a. Immediate variables
b. Global variables
c. Local variables
d. None of these

Answer: c. Local variables


These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q4. What does the open() function return for file operations?
a. File mode
b. File object
c. File name
d. None of these

Answer: b. File object


Q5. Python does not follow rigid indentation.
a. True
b. False

Answer: b. False


Q6. Which of the following is used to display an image in Python?
a. image.show()
b. image.open()
c. image.name()
d. image.mode()

Answer: a. image.show()


These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q7. Which of the following models does python follow for networking.
a. Client-server
b. P2P
c. All of these
d. None of these

Answer: a. Client-server


Q8. In python, ”with” ensures the file is closed after the operation is completed, but not when an exception occurs.
a. True
b. False

Answer: b. False


Q9. In Raspberry Pi, GPIO acts only as a digital output.
a. True
b. False

Answer: b. False


These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q10. Which of the following exits the nano editor in the terminal?
a. Ctrl+O
b. Ctrl+X
c. Ctrl+A
d. None of these

Answer: b. Ctrl+X


Q11. Does Raspberry Pi provide configuration options for cameras ?
a. Yes
b. No

Answer: a. Yes


These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q12. Does python provide a module for pi-camera ?
a. Yes
b. No

Answer: a. Yes


Q13. Which of the following converts energy to motion?
a. Actuator
b. Raspberry Pi
c. All of these
d. None of these

Answer: a. Actuator


These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q14. Which of the following is a property of a Relay.
a. Mechanical switch
b. Electrochemical switch
c. None of these
d. All of these

Answer: a. Mechanical switch


Q15. Sensors can be neither analog nor digital.
a. True
b. False

Answer: b. False


These are Introduction To Internet Of Things Week 6 Assignment 6 Answers

More Weeks of Introduction To Internet Of Things: Click here

More Nptel Courses: Click here


Session: JAN-APR 2023

Course Name: Introduction To Internet Of Things

Course Link: Click Here

These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q1. Python’s installation comes with an integrated development environment for programming.
a. True
b. False

Answer: a. True


Q2. Fill in the blanks. Python IDE is available for installation into PC with ________.
a. Windows
b. Linux
c. Mac
d. All of these

Answer: d. All of these


Q3. How many data type/s are available in Python?
a. 1
b. 2
c. 5
d. None of these

Answer: c. 5


These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q4. What is the output of the following piece of Python code?
Is= {1: “abc”, “key”: “2”, “year”: 2023}
print(ls[“key”]

a. abc
b. 2
c. 2023
d. “abe”

Answer: b. 2


Q5. The variable that is declared inside the function in Python is called a Global variable.
a. True
b. False

Answer: b. False


Q6. Which of the following is used to read a text file in Python?
a. file = open(‘data.txt’,’r”)
b. file =open_text(‘data.txt’,’r”)
c. file=read text(‘data.txt’,’r”)
d. file =read(‘data.txt’,’r”)

Answer: a. file = open(‘data.txt’,’r”)


These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q7. Which of the following libraries in Python is used for processing images.
a. Pillow
b. Numpy
c. Panda
d. None of these

Answer: a. Pillow


Q8. In python, images cannot be converted to greyscale.
a. True
b. False

Answer: b. False


Q9. Which of the following shortcut exits the nano editor?
a. Ctrl+E
b. Ctrl+O
c. Ctrl+V
d. None of these

Answer: d. None of these


These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q10. Which of the following is an unordered data type in Python?
a. List
b. Dictionary
c. Both List and Dictionary
d. Tuple

Answer: b. Dictionary


Q11. Sensors can be analog or digital. Is the statement true?
a. Yes
b. No

Answer: a. Yes


Q12. Is relay a type of mechanical switch?
a. No
b. Yes

Answer: b. Yes


These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q13. Which of the following converts energy to motion?
a. Actuator
b. Raspberry Pi
c. Sensor
d. None of these

Answer: a. Actuator


Q14. Python does not follow strict indentation.
a. True
b. False

Answer: b. False


Q15. Functions cannot be reassigned to the variables in Python.
a. True
b. False

Answer: b. False


These are Introduction To Internet Of Things Week 6 Assignment 6 Answers

All weeks of Introduction to Internet of Things: Click Here

More Nptel courses: Click Here


Session: Jul-Dec 2022

These are Introduction To Internet Of Things Week 6 Assignment 6 Answers

Course Name: Introduction To Internet Of Things

Link to Enroll: Click Here


Q1. What is the value that is assigned to the variable t in the given piece of python code? i, f, str=50, 50.68, “Welcome to python”
a. 50
b. 50.68
c. Welcome to python
d. All of these

Answer: b


Q2. What is the output of the following piece of python code?
x=17 y=23 z=x+y print(z
)
a. 40
b. 6
c. 1723
d. 30

Answer: c


These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q3. Fill in the blanks. Raspbian is a/n__________.
a. Microcomputer
b. Minicomputer
c. Operating system
d. Assembler

Answer: c


These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q4. What is the output of the following piece of Python code?
t1 = “‘Welcome to python coding print(t1[8:14])

a. to pyth
b. SyntaxError: invalid syntax
c. e to pyt
d. to pyt

Answer: d


Q5. Fill in the blanks. Raspberry Pi 3 Model B has a GPU support of__________.
a. 400 MHz video core IV
b. 250 MHz video core IV
C. Quad cortex A53@1.2GHz
d. ARM 11@1 GHz

Answer: a


Q6. Which of the following represents the command used for rebooting Raspberry Pi?
a. sudo reboot
b. sudo apt-get rebooting
c. pip install rebooting
d. All of these

Answer: a


These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q7. It is not possible to return multiple values from a function in Python.
a. True
b. False

Answer: b


Q8. What is the data type ot the va1able Is in the following piece of Python code? 1s{1: “item”, “key”: “21”, “year”: 2022}
a. dictionary
b. list
c. tuple
d. All of these

Answer: a


These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q9. A function in Python may or may not return a value.
a. True
b. False

Answer: a


These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q10. What are the basic modes to open a file in python?
a. Read mode (r) and write mode (w)
b. Append mode (a)
c. Both read and write mode (r+)
d. All of these

Answer: d


Q11. What are the socket types that exist in Python based socket programming?
a. AF_DG and SOCK SM
b. AF_UNIX and AF_INET
c. SOCK_UX and SOCK_IT
d. SOCK_DGRAM and SOCK_STREAM

Answer: d


Q12. Does Python support exception handling?
a. Yes
b. No

Answer: a


These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q13. Which of the following must be used to terminate a loop and move to the next code atter the loop?
a. list
b. try
c.continue
d. break

Answer: d


These are Introduction To Internet Of Things Week 6 Assignment 6 Answers


Q14. Select the option that does not represent a keyword in Python language?
a. while
b. if
c. try
d. integer

Answer: d


Q15. Raspberry Pi does not support any other language other than Python?
a. True
b. False

Answer: b


These are Introduction To Internet Of Things Week 6 Assignment 6 Answers

More NPTEL Solutions: https://progiez.com/nptel


These are Introduction To Internet Of Things Week 6 Assignment 6 Answers
The content uploaded on this website is for reference purposes only. Please do it yourself first.