WEEK 6 2021 Flashcards

1
Q

(Y/N)Is a tuple mutable in python?

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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)

A

signed char

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Symbol used to comment a line in python?

A

#

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Method used to add elements to an array in python?

A

All of these [append(),extend(),insert(i,a)]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which of the following is true for “==” operator in python programming?

A

compares the values of both the operands and checks for value equality

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Unordered collection of key-value pairs

A

Dictionary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which of the following is used when one needs a block of code syntactically, but wants to skip its execution?

A

Pass

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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)

A

array(‘I’,[5,4,3,2,1])

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which of the following is correct for image related operations with on-board Raspberry Pi camera in Python ?

A

from picamera import PiCamera

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Command to convert characters into integer

A

ord()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

(Y/N) In python programming, an array can hold only a single data type element, while a list can hold any data type element.

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

(Y/N) Does Raspberry Pi have internal storage?

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Raspberry Pi Model that has an on-board Bluetooth module

A

Raspberry Pi 3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The function time.sleep(arg) takes an argument in ___

A

seconds

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Number of GPIO pins in Raspberry Pi 0

A

40

How well did you know this?
1
Not at all
2
3
4
5
Perfectly