WEEK 6 2021 Flashcards
(Y/N)Is a tuple mutable in python?
No
What does ‘b’ stand for in the foll piece of code?
import array as arr
x=arr.array(‘b’,[1,2,3,4,5])
x=x[::-1]
print(x)
signed char
Symbol used to comment a line in python?
#
Method used to add elements to an array in python?
All of these [append(),extend(),insert(i,a)]
Which of the following is true for “==” operator in python programming?
compares the values of both the operands and checks for value equality
Unordered collection of key-value pairs
Dictionary
Which of the following is used when one needs a block of code syntactically, but wants to skip its execution?
Pass
Which is the output for the code?
import array as arr
x=arr.array(‘I’,[1,2,3,4,5])
x=x[::-1]
print(x)
array(‘I’,[5,4,3,2,1])
Which of the following is correct for image related operations with on-board Raspberry Pi camera in Python ?
from picamera import PiCamera
Command to convert characters into integer
ord()
(Y/N) In python programming, an array can hold only a single data type element, while a list can hold any data type element.
Yes
(Y/N) Does Raspberry Pi have internal storage?
No
Raspberry Pi Model that has an on-board Bluetooth module
Raspberry Pi 3
The function time.sleep(arg) takes an argument in ___
seconds
Number of GPIO pins in Raspberry Pi 0
40