What is the expected behavior of the following code?
What is the expected behavior of the following code?
What is the expected output of the following snippet?
A property that stores information about a given class's super-classes is named:
The following class hierarchy is given. What is the expected out of the code?
The following class hierarchy is given. What is the expected output of the code?
Assuming that the snippet below has been executed successfully, which of the following expressions will evaluate to True? (Select two answers)
string = 'python' [::2]
string = string[-1] + string[-2]
What is the expected behavior of the following code?
It will:
What is the expected output of the following code if existing_file is the name of a file located inside the working directory?
Assuming that the following inheritance set is in force, which of the following classes are declared properly? (Select two answers)
What is the expected output of the following code?
Assuming that the math module has been successfully imported, which of the following expressions evaluate to True? (Select two answers)
What is the expected behavior of the following code?
A file name like this one below says mat: (select three answers)
services. cpython-36.pyc
What is true about Python packages? (Select two answers)
Which of the following lambda definitions are correct? (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:
Assuming that the following snippet has been successfully executed, which of the equations are True? (Select two answers)
Which of the following lines of code will work flawlessly when put independently inside the inc ( ) method in order to make the snippet’s output equal to 3? (Select two answers)
If you need to serve two different exceptions called Ex1 and Ex2 in one except branch, you can write:
What is true about Python packages? (Select two answers)
A Python module named pymod.py contains a variable named pyvar.
Which of the following snippets will let you access the variable? (Select two answers)
If you want to access an exception object's components and store them in an object called e, you have to use the following form of exception statement
What is the expected behavior of the following code?
x = 8 ** (1/3)
y = 2. if x < 2.3 else 3.
print(y)
Python's built-in function named open () tries to open a file and returns:
What is the expected behavior of the following code?
What is the expected behavior of the following code?
What will the value of the i variable be when the following loop finishes its execution?
Which of the following snippets will execute without raising any unhandled exceptions? (Select answers)
A)
B)
C)
D)
Which of the equations are True? (Select two answers)
What is the expected output of the following code?
What is true about Object-Oriented Programming in Python? (Select two answers)
Can a module run like regular code?
Which of the following expression evaluate to True? (Select two answers)
A)
B)
C)
D)
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) )
If you need a function that does nothing, what would you use instead of XXX? (Select two answers)
def idler ( ):
XXX
What is the expected behavior of the following code?
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()
What is the expected behavior of the following code?
It will:
Which of the following expressions evaluate to True? (Select two answers)
Which of the following statements are true? (Select two answers)
What is the expected output of the following snippet?
What is the expected output of the following code if there is no file named non existing_file inside the working directory?