isclose
(
a
,
b
)
Returns True if two values are approximately equal: close to each other within a tolerance.
Two values are close if their absolute difference is not greater than the highest between the relative and absolute tolerances.
a
first value to compare
b
second value to compare
isclose(3.01, 3)
False
isclose(0.1 + 0.2, 0.3)
True
PyTamaro is a project created by the Lugano Computing Education Research Lab at the Software Institute of USI
Privacy Policy • Platform Version ede3c94 (Fri, 23 May 2025 14:43:18 GMT)