Exam PCAP All QuestionsBrowse all questions from this exam
Question 117

What is the expected behavior of the following code?

    Correct Answer: D

    B

Discussion
BonesawOption: B

Since people are having trouble with this, the ** means 8 raised to the power of (1/3). When you raise something to a third, it means taking the cube root. The cube root of 8 is 2, so x is less than 2.3 and the answer is B.

Dav023Option: B

2 is the right answer

macxszOption: D

x = 2.666 y = 3.0

macxsz

sorry, incorrect. The right answer is: B. it outputs 2.0

Mallie

x = 2, therefore y = 2.0

andr3Option: D

x = 2.6666666666666665 y = 2. if x < 2.3 else 3. #prints 3.0