With regards to the directory structure below, select the proper forms of the directives in order to import module_a. (Select two answers)

With regards to the directory structure below, select the proper forms of the directives in order to import module_a. (Select two answers) A . import pypack.module_aB . import module_a from pypackC . import module_aD . from pypack import module_aView AnswerAnswer: A,D

May 13, 2021 No Comments READ MORE +

What is true about Python packages? (Select two answers)

What is true about Python packages? (Select two answers)A . the__name__variable content determines the way in which the module was runB . a package can be stored as a tree of sub-directories/sub-foldersC . __pycache__is the name of a built-in variableD . hashbang is the name of a built-in Python functionView...

May 12, 2021 No Comments READ MORE +

Which of the following lines of code will work flawlessly when put independently inside the add_new () method in order to make the snippet's output equal to [0, 1, 1]? (Select two answers)

Which of the following lines of code will work flawlessly when put independently inside the add_new () method in order to make the snippet's output equal to [0, 1, 1]? (Select two answers) A . put self.store(1])B . self put stire(1])C . self .put self.get () [-1])D . self .put...

May 12, 2021 No Comments READ MORE +

Which line can be used instead of the comment to cause the snippet to produce the following expected output? (Select two answers)

Which line can be used instead of the comment to cause the snippet to produce the following expected output? (Select two answers) Expected output: 1 2 3 Code: A . c, b, a = b, a, cB . c, b, a = a, c, bC . a, b, c =...

May 12, 2021 No Comments READ MORE +

What is the expected output of the code?

The following class hierarchy is given. What is the expected output of the code? A . BBB . CCC . AAD . BCView AnswerAnswer: D

May 12, 2021 No Comments READ MORE +

Which of the following statements are true? (Select two answers)

Which of the following statements are true? (Select two answers)A . open () requires a second argumentB . open () is a function which returns an object that represents a physical fileC . instd, outstd, errstd are the names of pre-opened streamsD . if invoking open () fails, an exception...

May 10, 2021 No Comments READ MORE +

Which of the following expression evaluate to True? (Select two answers)

Which of the following expression evaluate to True? (Select two answers)A . 'in not' in 'not'B . 'in' in 'Thames'C . 't' . upper ( ) in 'Thames'D . 'in' in 'in'View AnswerAnswer: C,D

May 10, 2021 No Comments READ MORE +

There is a stream named s open for writing.

There is a stream named s open for writing. What option will vou select to write a line to the stream''A . s.write("Hello")B . write(s, "Hello")C . s.writeln("Hello")D . s.writeline("Hello")View AnswerAnswer: A Explanation: Reference: https://en.wikibooks.org/wiki/Python_Programming/Input_and_Output

May 9, 2021 No Comments READ MORE +

Assuming that the code below has been placed inside a file named code.py and executed successfully, which of the following expressions evaluate to True? (Select two answers)

Assuming that the code below has been placed inside a file named code.py and executed successfully, which of the following expressions evaluate to True? (Select two answers) A. str(Object) == 'Object' B. _name == _main_' C. ClassA. _module_ == 'ClassA' D. len(ClassB.__bases__) == 1View AnswerAnswer: B,D

May 9, 2021 No Comments READ MORE +

Which of the following statements are true? (Select two answers)

Which of the following statements are true? (Select two answers)A . e is an escape sequence used to mark the end of linesB . ASCII is synonymous with UTF-8C . II in ASCII stands for Information InterchangeD . a code point is a number assigned to a given characterView AnswerAnswer:...

May 7, 2021 No Comments READ MORE +