Certified Associate in Python Programming (PCAP-31-03) — Question 41

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

Answer options

Correct answer: C, D

Explanation

Option C is correct because both math.floor(2.5) and math.trunc(2.5) return 2. Option D is also correct as math.hypot(3,4) computes to 5, which is equal to math.sqrt(25). Options A and B are incorrect; math.ceil(2.5) results in 3, which does not equal math.trunc(2.5), and math.ceil(2.5) is not less than math.floor(2.5).