Which of the following statements about the linearization of this code are TRUE? Check all that apply class A: pass class B: pass class C (A): pass class
D
(A, B): pass class
E(C)
: pass class
F(E,D)
: pass When performing a linearization of
F
, the initial step would be:
L(F)=[F]+
merge
(L(D),L(E),[D,E])
When performing a linearization of
D
, the step:
L(D)=[D,A]+
merge([object], [B, object], [B]) will result in
L(D)=[D,A
, object
]+merge([B],[B])
At any step of the linearization algorithm, during the merge process, the next class to search is picked by selecting the first head of the lists which does not appear in the tail When performing a linearization of
D
, the initial step would be:
L(D)=[D]+merge(L(D),L(E),[D,E])
When performing a linearization of
F
, the step:
L(F)=[F,E]+
merge ([C, A object], [D, A, B, object], [D]) will result in
L(F)=[F,E,C]+
merge ([A, object], [D, A, B, object], [D]) Which of the following statements about Python scope are TRUE? Check all that apply To access a global variable inside a function, one just needs to use its name Local scope includes parameter names and variables local to the function Local scope is defined at a function level and it does not matter where the variable is defined inside this function - it is still visible throughout this function A variable that is defined inside an if statement or a loop is visible outside of these blocks, but only if these statements get to be executed - this speaks to the dynamic nature of the scope In a nested function, to access a non-local variable defined in the enclosing scope, one just needs to use its name