Exam PCAP-31-03 All QuestionsBrowse all questions from this exam
Question 41

Assuming that the math module has been successfully imported, which of the following expressions evaluate to True? (Choose two.)

    Correct Answer: C, D

    math.floor(2.5) and math.trunc(2.5) both return the largest integer value less than or equal to 2.5, which is 2. Therefore, they evaluate to the same value making the expression math.floor(2.5) == math.trunc(2.5) true. On the other hand, math.hypot(3,4) finds the Euclidean distance from the origin to the point (3,4) which is 5, and math.sqrt(25) calculates the square root of 25, which is also 5. Thus, math.hypot(3,4) == math.sqrt(25) evaluates to true.

Discussion
DKAT2023Options: CD

C and D are corrects