What is the expected behavior of the following code?
x - 3 % 1
y -1 if x > else 0
print (y)
Answer : D
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()
Answer : B, C
What is the expected out of the following code of the file named zero_length_existing_file is a zero-length file located inside the working directory?
Answer : A
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]
Answer : B, C
Which of the following expression evaluate to True? (Select two answers)
Answer : C, D
Assuming that the following snippet has been successfully executed, which of the equations are True? (Select two answers)
Answer : B, D
Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Select two answers)
Answer : C, D