What is true about Object-Oriented Programming in Python? (Select two answers)

What is true about Object-Oriented Programming in Python? (Select two answers)A . encapsulation allows you to protect some data from uncontrolled accessB . the arrows on a class diagram are always directed from a superclass towards its subclassC . inheritance is the relation between a superclass and a subclassD ....

June 23, 2022 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

June 23, 2022 No Comments READ MORE +

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:...

June 23, 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 [1, 3]B . the code is erroneous and it will not executeC . it outputs [3, 1]D . it outputs [4, 2, 0]View AnswerAnswer: A

June 23, 2022 No Comments READ MORE +

What is the expected output of the following code?

What is the expected output of the following code? A . abcefB . The program will cause a runtime exception errorC . acdefD . abdefView AnswerAnswer: B

June 22, 2022 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) B) C) D) A . Option AB . Option BC . Option CD . Option DView AnswerAnswer: C,D

June 22, 2022 No Comments READ MORE +

You need data which can act as a simple telephone directory. You can obtain it with the following clauses (choose two relevant variants; assume that no other items have been created before)

You need data which can act as a simple telephone directory. You can obtain it with the following clauses (choose two relevant variants; assume that no other items have been created before)A . dir={'Mom':5551234567, 'Dad':5557654321>B . dir={'Mom':'5551234567', * Dad':'5557654321'}C . dir={Mom:5551234567, Dad:5557654321}D . dir={Mom:'5551234567', Dad:'5557654321'}View AnswerAnswer: C,D

June 21, 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 1B . it outputs 0C . it raises an exceptionD . it outputs 2View AnswerAnswer: A

June 20, 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 raises an exceptionB . it outputs TrueC . it outputs FalseD . it outputs nothingView AnswerAnswer: B

June 20, 2022 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...

June 20, 2022 No Comments READ MORE +