Assignment W6
Assignment W6
Introduction to
Internet of Things
Assignment-Week 6
TYPE OF QUESTION:MCQ/MSQ
QUESTION 1:
b. False
QUESTION 2:
a. True
b. False
Detailed Solution: Python does not support strict rules for syntax.
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
Detailed Solution: IDE is a software that is used to write codes, integrate several modules and
libraries.
QUESTION 4:
a. True
b. False
Detailed Solution: To indicate different blocks of code, Python follows rigid indentation.
QUESTION 5:
QUESTION 6:
a. Read mode
b. Write mode
c. Append mode
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
QUESTION 7:
State whether the following command to install the PIL library is correct or not.
sudo pip get pillow
a. Correct
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
QUESTION 8:
Correct Answer: a. 5
Detailed Solution: There are 5 data types in Python.
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
Detailed Solution: Invalid as the colons are missing in elif and else statements.
QUESTION 10:
QUESTION 11:
QUESTION 12:
QUESTION 13:
a. Ctrl + X
b. Ctrl + O
c. Ctrl + K
d. None of these
QUESTION 14:
GPIO.output(11,True)
QUESTION 15:
raspistill -o image.jpg
************END***********