Introduction To Internet Of Things Week 6
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: d. file =read(‘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: b. Ctrl+O
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 [email protected]
d. ARM [email protected] 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
* The material and content uploaded on this website are for general information and reference purposes only. Please do it by your own first. COPYING MATERIALS IS STRICTLY PROHIBITED.
More from PROGIEZ
