This set of MCQ(multiple choice questions) focuses on the Introduction To Internet Of Things Week 6 Solutions.
Course layout (All week answers link)
Week 0
Week 1: Introduction to IoT
Week 2: Basics of Networking
Week 3: Communication Protocols
Week 4: Sensor Networks
Week 5: Interoperability in IoT
Week 6: Introduction to Python programming
Week 7: Implementation of IoT with Raspberry Pi (contd), Introduction to SDN, SDN for IoT
Week 8: SDN for IoT (contd), Data Handling and Analytics, Cloud Computing
Week 9: Cloud Computing(contd), Sensor-Cloud
Week 10: Fog Computing, Smart Cities and Smart Homes
Week 11: Connected Vehicles, Smart Grid, Industrial IoT
Week 12: Industrial IoT (contd), Case Study: Agriculture, Healthcare, Activity Monitoring
NOTE: You can check your answer immediately by clicking show answer button. Moreover, this set of “Introduction To Internet Of Things Week 6 Solutions” contains 15 questions.
Now, start attempting the quiz.
Introduction To Internet Of Things Week 6 Solutions
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
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()
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
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
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
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: d) All of these
Q15. Sensors can be neither analog nor digital.
a) True
b) False
Answer: b) False
Introduction To Internet Of Things Week 6 Solutions
Q1. What is the value that is assigned to the variable f 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) 50.68
Q2. What is the output of the following piece of python code?
a) 40
b) 6
c) 1723
d) 30
Answer: c) 1723
Q3. Fill in the blanks. Raspbian is a/n _____________
a) Microcomputer
b) Minicomputer
c) Operating system
d) Assembler
Answer: c) Operating system
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) to pyt
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) 400 MHz video core IV
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) sudo reboot
Q7. It is not possible to return multiple values from a function in Python
a) True
b) False
Answer: b) False
Q8. What is the data type of the variable ls in the following piece of Python code?
ls = {1: “item”, “key”: “21”, “year”: 2022}
a) dictionary
b) list
c) tuple
d) All of these
Answer: a) dictionary
Q9. A function in Python may or may not return a value.
a) True
b) False
Answer: a) True
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) All of these
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) SOCK_DGRAM and SOCK_STREAM
Q12. Does Python support exception handling?
a) Yes
b) No
Answer: a) Yes
Q13. Which of the following must be used to terminate a loop and move to the next code after the loop?
a) list
b) try
c) continue
d) break
Answer: d) break
Q14. Select the option that does not represent a keyword in Python language?
a) while
b) if
c) try
d) integer
Answer: d) integer
Q15. Raspberry Pi does not support any other language other than Python?
a) True
b) False
Answer: b) False
Previous Course – NPTEL Week 6 Solutions
Q1. What is the output for the following piece of Python code?
x = [32, ‘u’, ‘i’, 8, ’34’]
x = x[0:]
print(x)
a) [32]
b) [’34’]
c) [‘u’, ‘i’, 8, ’34’]
d) [32, ‘u’, ‘i’, 8, ’34’]
Answer: d)
Q2. How many GPIO (General Purpose Input Output Pin) pins are there in Raspberry Pi 4?
a) 30
b) 14
c) 40
d) 41
Answer: c)
Q3. Which of the following is NOT an example of Python IDE?
a) Sublime Text
b) PyCharm
c) Spider
d) None of the above
Answer: c)
Q4. What is the value of ‘x’ in the following expression in Python programming?
x = 3^3
a) 0
b) 9
c) -2
d) Will raise an exception
Answer: a)
Q5. In python programming, which of the following is a null statement?
a) Pass
b) Continue
c) Break
d) Skip
Answer: a)
Q6. Which of the following is an unordered data type in Python?
a) List
b) Dictionary
c) Both List and Dictionary
d) Tuple
Answer: b)
Q7. What is the value of ‘x’ in the following expression in Python programming?
x = 2**3^3**1
a) 11
b) 0
c) Will raise an error
d) Will raise an exception
Answer: a)
Q8. Which of the following symbol is used to comment out multiple lines at once in python?
a) $
b) #
c) %
d) None of these
Answer: d)
Q9. With on-board Raspberry Pi camera, which one of the following is NOT correct for image related operations in Python?
a) from PIcamera import PiCamera
b) from picamera import PyCamera
c) from pycamera import PiCamera
d) All of these
Answer: d)
Q10. Which of the following bit processor is used in Raspberry Pi Zero 2 W?
a) 64
b) 32
c) Both 64 & 32
d) 128
Answer: a)
Q11. Which of the following shortcut exits the nano editor?
a) Ctrl + E
b) Ctrl + O
c) Ctrl + X
d) None of these
Answer: c)
Q12. What of the following syntax is correct for networking in python?
a) s = socket.socket(socket.AF_NET, socket.SOCK_STRAM)
b) s = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
c) s = socket.socket(socket.AF_UNX, socket.SOCK_TCP)
d) s = socket.socket(socket.AF)INET, socket.SOCK_UDP)
Answer: b)
Q13. Which of the following is correct to open a text file for write mode?
a) open(‘file.txt’, ‘w’)
b) open(‘file.txt’, ‘+w’)
c) open(‘file.txt’, ‘w+’)
d) open(‘file.txt’, ‘o+w’)
Answer: a)
Q14. Which of the following is an immutable data type in Python?
a) String
b) Tuple
c) Bool
d) All of these
Answer: d)
Q15. Does python follow rigid indentation?
a) Yes
b) No
c) Not Applicable
Answer: a)
<< Pre- Introduction To Internet Of Things Week 5 solutions
>> Next- Introduction To Internet Of Things Week 7 Solutions
DISCLAIMER: Use these answers only for the reference purpose. Quizermania doesn't claim these answers to be 100% correct. So, make sure you submit your assignments on the basis of your knowledge.
For discussion about any question, join the below comment section. And get the solution of your query. Also, try to share your thoughts about the topics covered in this particular quiz.
Good
Thank you!