The first parameter of each method:

The first parameter of each method:A . holds a reference to the currently processed objectB . is always set to NoneC . is set to a unique random valueD . is set by the first argument's valueView AnswerAnswer: D Explanation: The first argument of every class method, including init, is...

November 8, 2021 No Comments READ MORE +

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

Which of the following expressions evaluate to True? (Select two answers)A . 121 + 1 != '!'+ 2 * '2'B . 'AbC' lower () 'AB'<C . '1'+ '1'+ '1'< '1'*3'D . '3.14'!= str(3.1415)View AnswerAnswer: A,D

November 8, 2021 No Comments READ MORE +

Which one of the platform module functions should be used to determine the underlying platform name?

Which one of the platform module functions should be used to determine the underlying platform name?A . platform.uname ()B . platform.platform ()C . platform.python_version()D . platform.processor()View AnswerAnswer: B

November 8, 2021 No Comments READ MORE +

What is the expected out of the code?

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

November 8, 2021 No Comments READ MORE +

How many elements will the list2 list contain after execution of the following snippet?

How many elements will the list2 list contain after execution of the following snippet? list1 = [False for i in range (1, 10) ] list2 = list1 [-1:1:-1]A . zeroB . fiveC . sevenD . threeView AnswerAnswer: C

November 6, 2021 No Comments READ MORE +

What is the expected behavior of the following code?

What is the expected behavior of the following code? It will:A . print 0B . cause a runtime exceptionC . prints 3D . print an empty lineView AnswerAnswer: B

November 6, 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...

November 6, 2021 2 Comments READ MORE +

What is true about the following snippet? (Select two answers)

What is true about the following snippet? (Select two answers) A . the code will raise an unhandled exceptionB . the siring I feel fine 'will be seenC . the string it's nice to see you will be seenD . the string what a pity will be seenView AnswerAnswer: B,D

November 6, 2021 No Comments READ MORE +

If you need to serve two different exceptions called Ex1 and Ex2 in one except branch, you can write:

If you need to serve two different exceptions called Ex1 and Ex2 in one except branch, you can write:A . except Ex1 Ex2:B . except (ex1, Ex2):C . except Ex1, Ex2:D . except Ex1+Ex2:View AnswerAnswer: D

November 6, 2021 No Comments READ MORE +

What is true about Python class constructors? (Select two answers)

What is true about Python class constructors? (Select two answers)A . the constructor's first parameter identifies an object currently being createdB . the constructor cannot use the default values of the parametersC . the constructor can be invoked directly under strictly defined circumstancesD . super-class constructor is invoked implicitly during...

November 6, 2021 No Comments READ MORE +