If you need a function that does nothing, what would you use instead of XXX? (Select two answers)
def idler ( ):
XXX
Assuming that the following code has been executed successfully, select the expressions which evaluate to true.
(Select two answers.)
The__bases__property contains:
What is true about Python packages? (Select two answers)
How many lines does the following snippet output?
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)
An operator able to perform bitwise shifts is coded as (select two answers)
What is the expected behavior of the following code?
A two-parameter lambda function raising its first parameter to the power of the second parameter should be declared as:
What is true about the following snippet? (Select two answers)
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?
A file name like this one below says mat: (select three answers)
services. cpython-36.pyc
Which of the following expression evaluate to True? (Select two answers)
You are going to read just one character from a stream called s. Which statement would you use?
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]
Which of the following statements are true? (Select two answers)
What is the expected output of the following code?
The following class hierarchy is given. What is the expected out of the code?
What is the expected behavior of the following code?
Assuming that the snippet below has been executed successfully, which of the following expressions will evaluate to True? (Select two answers)
string = 'SKY' (:: -1)
string = string (-1)
A property that stores information about a given class's super-classes is named:
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:
Which of the following expression evaluate to True? (Select two answers)
A)
B)
C)
D)
What is the expected behavior of the following code?
Assuming that the V variable holds an integer value to 2, which of the following operators should be used instead of OPER to make the expression equal to 1?
V OPER 1 -
There is a stream named s open for writing. What option will you select to write a line to the stream''
Assuming that String is six or more letters long, the following slice
String[1:-2]
is shorter than the original string by:
What is the expected behavior of the following code?
What is the expected output of the following snippet?
Which of the following lines of code will work flawlessly when put independently inside the add_new () method in order to make the snippet's output equal to [0, 1, 1] ? (Select two answers)
If you need to serve two different exceptions called Ex1 and Ex2 in one except branch, you can write:
Which of the following statements are true? (Select two answers)
A compiler is a program designed to (select two answers)
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?
What can you deduce from the following statement? (Select two answers)
str = open('file.txt', "rt")
What is the expected behavior of the following snippet?
It will:
What is the expected output of the following snippet?
What is the expected behavior of the following code?
It will:
What is the expected behavior of the following code?
What is the expected output 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()
Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Choose two.)
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) )
What is the expected behavior of the following code?
What is the expected output of the following snippet?
Which of the following lines of code will work flawlessly when put independently inside the add_new () method in order to make the snippet's output equal to [0, 1, 21 ? (Select two answers)