What is the expected behavior of the following code?
Answer : D
What is the expected output of the following code?
myli = range (-2,2)
m = list(filter(lambda x: True if abs(x) < 1 else False, myli)) print(len(m))
Answer : B
What is true about lambda functions? (Choose two.)
Answer : AD
What is the expected behavior of the following code?
x =3 % 1
y = 1 if x > 0 else 0
print(y)
Answer : B
What is the expected output of the following code if the file named zero_length_existing_file is a zero-length file located inside the working directory?
Answer : D
What is the expected output of the following code?
Answer : C
What is the expected behavior of the following code?
my_list = [i for i in range(5)]
m = [my_list[i] for i in range(4, 0, -1) if my_list[i] % 2 != 0] print(m)
Answer : B
Assuming that the following code has been executed successfully, select the expressions which evaluate to True (Choose two.)
Answer : AD
Which of the following statements are true? (Choose two.)
Answer : AC
What is the expected output of the following code if there is no file named non_existing_file inside the working directory?
Answer : B
Assuming that the math module has been successfully imported, which of the following expressions evaluate to True? (Choose two.)
Answer : CD
With regards to the directory structure below, select the proper forms of the directives in order to import module_b. (Choose two.)
Answer : BC
What is the expected output of the following code?
import sys
b1 type (dir(sys)) is str
b2 type (sys.path[-1]) is str
print (b1 and b2)
Answer : B
What is the expected behavior of the following code?
Answer : B
What is the expected behavior of the following code?
Answer : D
Have any questions or issues ? Please dont hesitate to contact us