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 the expected behavior of the following code?
What is the expected behavior of the following code? A . it outputs 6B . it outputs 1C . it outputs 3D . it raises an exceptionView AnswerAnswer: A
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
Which of the following snippets will execute without raising any unhandled exceptions? (Select answers)
Which of the following snippets will execute without raising any unhandled exceptions? (Select answers) A) B) C) D) A . Option AB . Option BC . Option CD . Option DView AnswerAnswer: B,C,D
Which of the following invocations are valid? (Select two answers)
Which of the following invocations are valid? (Select two answers)A . rfind("python","r")B . sorted("python")C . "python".sort ()D . "python".index("th")View AnswerAnswer: B,D
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:...
What is the expected behavior of the following code?
What is the expected behavior of the following code? x = 8 ** (1/3) y = 2. if x < 2.3 else 3. print(y)A . it outputs 2.0B . it outputs 2. 5C . the code is erroneus and it will not executeD . it outputs 3.0View AnswerAnswer: A
Assuming that the code below has been executed successfully, which of the following expressions will always evaluate to True? (Select two answers)
Assuming that the code below has been executed successfully, which of the following expressions will always evaluate to True? (Select two answers) import random v1 = random. random() v2 = random. random()A . len(random. sample([1,2,3],1)) > 2B . v1 == v2C . random.choice{[1,2,3]) > 0D . v1 < 1View AnswerAnswer:...
What is the expected behavior of the following code?
What is the expected behavior of the following code? A . it outputs 'None'B . it outputs 3C . it raises an exceptionD . it outputs 0View AnswerAnswer: B
Which of the following lambda function definitions are correct? (Select two answers)
Which of the following lambda function definitions are correct? (Select two answers)A . lambda X: NoneB . lambda: 3,1415C . lambda x: def fun(x): return xD . lambda lambda: lambda * lambdaView AnswerAnswer: A,B