If you need a function that does nothing, what would you use instead of XXX? (Select two answers)
def idler ( ):
XXX
What is true about Python packages? (Select two answers)
What is true about Python packages? (Select two answers)
What is the expected behavior of the following code?
Which of the following expressions evaluate to True? (Select two answers)
What is the expected output of the following code if there is no file named non existing_file inside the working directory?
What is the expected behavior of the following code?
x = 8 ** (1/3)
y = 2. if x < 2.3 else 3.
print(y)
What is the expected behavior of the following code?
The following class definition is given. We want the show () method to invoke the get () method, and then output the value the get () method returns. Which of the invocations should be used instead of XXX?
If you need to serve two different exceptions called Ex1 and Ex2 in one except branch, you can write:
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 true about the __based__attribute in Python?
Assuming that the following snippet has been successfully executed, which of the equations are False? (Select two answers)
What is the expected behavior of the following code?
What is the expected output of the following code?
Which of the listed actions can be applied to the following tuple? (Select two answers)
What is the expected output of the following snippet?
Assuming that the following code has been executed successfully, select the expressions which evaluate to true.
(Select two answers.)
Which of the following lambda function definitions are correct? (Select two answers)
What is the expected behavior of the following code?
A method for passing the arguments used by the following snippet is called:
What is the expected output of the following code if the file named existing_text_file is a non-zero length text file located inside the working directory?
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)
You are going to read 16 bytes from a binary file into a bytearray called data. Which lines would you use? (Select two answers)
Is it possible to safely check if a class object has a certain attribute0
Which of the equations are True? (Select two answers)
Can a module run like regular code?
Which of the following statements are true? (Select two answers)
What will be the value of the i variable when the while e loop finishes its execution?
Which of the following statements are true? {Select two answers)
Which of the following words can be used as a variable name? (Select two valid names)
The following class hierarchy is given. What is the expected output of the code?
Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Choose two.)
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?
Files with the suffix .pyc contain:
What is the expected behavior of the following snippet?
It will:
What is the expected behavior of the following code?
It will:
Executing the following snippet
will cause the dct:
What is the expected output of the following code?
What is the expected output of the following code?
Assuming that the following code has been executed successfully, selected the expression which evaluate to True (Select two answers)
Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Select two answers)
Assuming that the math module has been successfully imported, which of the following expressions evaluate to 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)