Assuming that the following inheritance set is in force, which of the following classes are declared properly? (Select two answers)

Assuming that the following inheritance set is in force, which of the following classes are declared properly? (Select two answers) A . class Class_4 (D, A) : passB . class Class_1(C,D): passC . class Class_3(A,C): passD . class Class_2(B,D): passView AnswerAnswer: A,B

June 15, 2022 No Comments READ MORE +

What is the expected behavior of the following code?

What is the expected behavior of the following code? A . It outputs FalseB . It outputs nothingC . It outputs TrueD . It raises an exceptionView AnswerAnswer: A

June 15, 2022 No Comments READ MORE +

An operator able to perform bitwise shifts is coded as (select two answers)

An operator able to perform bitwise shifts is coded as (select two answers)A . - -B . ++C . <<D . >>View AnswerAnswer: C,D Explanation: Reference: https://www.geeksforgeeks.org/basic-operators-python/

June 15, 2022 No Comments READ MORE +

What will the value of the i variable be when the following loop finishes its execution?

What will the value of the i variable be when the following loop finishes its execution? A . 10B . the variable becomes unavailableC . 11D . 9View AnswerAnswer: D Explanation: Pass only means there are no statements to execute it does not means the variable is unavailable. Try a...

June 15, 2022 No Comments READ MORE +

A method for passing the arguments used by the following snippet is called:

A method for passing the arguments used by the following snippet is called: A . sequentialB . namedC . positionalD . keywordView AnswerAnswer: C

June 14, 2022 No Comments READ MORE +

What is the expected behavior of the following code?

What is the expected behavior of the following code? A . it outputs list assignment index out of rangeB . the code is erroneous and it will not executeC . it outputs <class 'IndexError'>D . it outputs errorView AnswerAnswer: A

June 14, 2022 No Comments READ MORE +

What can you deduce from the following statement? (Select two answers)

What can you deduce from the following statement? (Select two answers) str = open('file.txt', "rt")A . str is a string read in from the file named file.txtB . a newlina character translation will be performed during the readsC . if file. txt does not exist, it will be createdD ....

June 14, 2022 No Comments READ MORE +

What is the expected output of the following code?

What is the expected output of the following code? A . 3B . 5C . 4D . an exception is raisedView AnswerAnswer: A

June 13, 2022 No Comments READ MORE +

What is the expected output of the following code?

What is the expected output of the following code? def foo(x,y,z): return x(y) - x(z) print{f00(lambda x: x % 2, 2, 1) )A . 1B . 0C . -1D . an exception is raisedView AnswerAnswer: C

June 13, 2022 No Comments READ MORE +

Assuming that the following code has been executed successfully, selected the expression which evaluate to True (Select two answers)

Assuming that the following code has been executed successfully, selected the expression which evaluate to True (Select two answers) A . a ( ) == 4B . a is not NoneC . b ( ) == 4D . a ! = bView AnswerAnswer: A,B

June 12, 2022 No Comments READ MORE +