What is true about Python packages? (Select two answers)
What is true about Python packages? (Select two answers)A . the sys.path variable is a list of stringsB . _pycache_is a folder that stores semi-completed Python modulesC . a package contents can be stored and distributed as an mp3 fileD . a code designed to initialize a package's state should...
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
Assuming that the math module has been successfully imported, which of the following expressions evaluate to True? (Select two answers)
Assuming that the math module has been successfully imported, which of the following expressions evaluate to True? (Select two answers)A . math. hypot (3,4) == math.sqrt (25)B . math. hypot (2,5) == math.truec (2.5)C . math. hypot (2,5) == math.true (2.5)D . math. cell (2,5) == math.floor (2.5)View AnswerAnswer: A,B
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
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
What is a true about python class constructors? (Select two answers)
What is a true about python class constructors? (Select two answers)A . the constructor must have at least one parameterB . the constructor must return a value other than NoneC . the constructor is a method named_init_D . there can the more than one constructor in a Python class.View AnswerAnswer:...
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: B,D
Which of the following statement are true? (Select two answers)
Which of the following statement are true? (Select two answers)A . closing an open file is performed by the closefile ( ) functionB . the second open ( ) argument describes the open mode and defaults to ‘w’C . if open ( ) ‘s second argument is ‘r’ the file...
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 ....
What is the expected behavior of the following code?
What is the expected behavior of the following code? A . it outputs 2B . the code is erroneous and it will not executeC . it outputs 1D . it outputs 3View AnswerAnswer: C