Python Institute PCAP 31 03
Q: 1
What is the expected behavior of the following code?
x = 8 ** (1/3)
y = 2. if x < 2.3 else 3.
print(y)
Options
Q: 2
Which of the following statement are true? (Select two answers)
Options
Q: 3
Which of the following expressions evaluate to True? (Select two answers)
Options
Q: 4
Which of the following lambda function definitions are correct? (Select two answers)
Options
Q: 5
What is a true about python class constructors? (Select two answers)
Options
Q: 6
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()
Options
Q: 7
Assuming that String is six or more letters long, the following slice
String[1:-2]
is shorter than the original string by:
Options
Q: 8
What is the output of the following piece of code?


Options
Q: 9
What is the expected behavior of the following code?


Options
Q: 10
Assuming that the following code has been executed successfully, selected the expression which
evaluate to True (Select two answers)


Options
Question 1 of 10