PCAP Exam QuestionsBrowse all questions from this exam

PCAP Exam - Question 117


What is the expected behavior of the following code?

Show Answer
Correct Answer: B

B

Discussion

4 comments
Sign in to comment
BonesawOption: B
Jan 9, 2024

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.

macxszOption: D
Apr 30, 2022

x = 2.666 y = 3.0

macxsz
May 4, 2022

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

Mallie
Dec 21, 2022

x = 2, therefore y = 2.0

Dav023Option: B
Sep 29, 2022

2 is the right answer

andr3Option: D
Mar 7, 2023

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