NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
Introduction to
Internet of Things
Assignment-Week 6
TYPE OF QUESTION:MCQ/MSQ
Number of questions:15 Total marks: 15 X 1= 15
QUESTION 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
Correct Answer: a. True
Detailed Solution: Python is popular for embedded application development as it is a very
lightweight programming language.
(Please refer to lecture INTRODUCTION TO PYTHON PROGRAMMING- I @ 1:22)
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
QUESTION 2:
State True or False.
Statement: “Python does not support strict rules for syntax.”
a. True
b. False
Correct Answer: a. True
Detailed Solution: Python does not support strict rules for syntax.
(Please refer to lecture INTRODUCTION TO PYTHON PROGRAMMING- I @ 03:38)
QUESTION 3:
_________ is a software that is used to write codes, integrate several modules and libraries.
a. IDE
b. Module
c. API
d. None of these
Correct Answer: a. IDE
Detailed Solution: IDE is a software that is used to write codes, integrate several modules and
libraries.
(Please refer to lecture INTRODUCTION TO PYTHON PROGRAMMING- I @ 05:02).
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
QUESTION 4:
State True or False.
Statement: “To indicate different blocks of code, Python follows rigid indentation.”
a. True
b. False
Correct Answer: a. True
Detailed Solution: To indicate different blocks of code, Python follows rigid indentation.
(Please refer to lecture INTRODUCTION TO PYTHON PROGRAMMING- I @ 7::29).
QUESTION 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
Correct Answer: a. Hi, Welcome to python!
Detailed Solution: The output of the following line of code in Python -
>>> print “Hi, Welcome to python!”
Output: Hi, Welcome to python!
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
(Please refer to lecture INTRODUCTION TO PYTHON PROGRAMMING- II @ 07:31)
QUESTION 6:
Which of the following is a mode to open a file in Python?
a. Read mode
b. Write mode
c. Append mode
d. All of these
Correct Answer: d. All of these
Detailed Solution: The four basic modes to open a file in python are –
a. Read mode
b. Write mode
c. Append mode
d. Both read and write mode
(Please refer to lecture INTRODUCTION TO PYTHON PROGRAMMING- II @ 03:00)
QUESTION 7:
State whether the following command to install the PIL library is correct or not.
sudo pip get pillow
a. Correct
b. Incorrect
Correct Answer: b. Incorrect
Detailed Solution: The command to install the PIL library is sudo pip install pillow.
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
(Please refer to lecture INTRODUCTION TO PYTHON PROGRAMMING- II @ 17:40 )
QUESTION 8:
How many data types are these in Python?
a. 5
b. 7
c. 8
d. None of these
Correct Answer: a. 5
Detailed Solution: There are 5 data types in Python.
(Please refer to lecture INTRODUCTION TO PYTHON PROGRAMMING- II @9:40).
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
QUESTION 9:
State whether the following controlling statement structure is valid in Python or not.
if(condition):
statement 1
statement2
elif(condition)
statement 1
statement 2
else
statement 1
statement 2
a. Invalid
b. Valid
Correct Answer: a. Invalid
Detailed Solution: Invalid as the colons are missing in elif and else statements.
(Please refer to lecture INTRODUCTION TO RASPBERRY PI-I @29:37).
QUESTION 10:
Can we configure Raspberry Pi as a Web Server?
a. Yes
b. No
Correct Answer: a. Yes
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
Detailed Solution: We can configure Raspberry Pi as a Web Server.
See lecture INTRODUCTION TO RASPBERRY PI-I @ 02:46
QUESTION 11:
What is the frequency of the Raspberry Pi Zero CPU?
a. 2.1 GHz
b. 1.1 GHz
c. 3.1 Ghz
d. None of these
Correct Answer: d. None of these
Detailed Solution: The frequency of the Raspberry Pi Zero CPU is 1 GHz.
See lecture INTRODUCTION TO RASPBERRY PI-II @ 05:05
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
QUESTION 12:
What does the following line of code do?
sudo apt-get install python-rpi.gpio
a. It installs the Raspberry Pi GPIO library
b. It installs the Python essentials for GPIO
c. Both (a) and (b)
d. Neither (a) nor (b)
Correct Answer: a. It installs the Raspberry Pi GPIO library
Detailed Solution: It installs the Raspberry Pi GPIO library.
See lecture IMPLEMENTATION OF IOT WITH RASPBERRY PI-II @ 07:35
QUESTION 13:
Which command Exits the nano editor?
a. Ctrl + X
b. Ctrl + O
c. Ctrl + K
d. None of these
Correct Answer: a. Ctrl + X
Detailed Solution: Ctrl + O exits the nano editor.
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
See lecture IMPLEMENTATION OF IOT WITH RASPBERRY PI-II @ 10:20
QUESTION 14:
What does the following line of code do?
GPIO.output(11,True)
a. Sets GPIO 11 as output pin
b. Turns on GPIO pin 11
c. Neither (a) nor (b)
d. Both (a) and (b)
Correct Answer: b. Turns on GPIO pin 11
Detailed Solution: Turns on GPIO pin 11
(Please refer to lecture INTRODUCTION TO PYTHON PROGRAMMING- II @ 11:18)
QUESTION 15:
What does the following line of code do?
raspistill -o image.jpg
a. Captures video feed
b. Captures still image
c. Both (a) and (b)
d. None of these
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
Correct Answer: b. Captures still image
Detailed Solution: Captures still image.
(Please refer to lecture INTRODUCTION TO RASPBERYY PI-II @ 19:29)
************END***********