diff --git a/docs/lesson02/prepare.html b/docs/lesson02/prepare.html index 3abc52c..4a62ad1 100644 --- a/docs/lesson02/prepare.html +++ b/docs/lesson02/prepare.html @@ -25,7 +25,7 @@ "educationalUse": "instruction", "copyrightNotice": "Copyright © 2019, Brigham Young University–Idaho. All rights reserved.", "datePublished": "2019-11-20", - "dateModified": "2022-12-09" + "dateModified": "2024-09-25" } @@ -561,6 +561,20 @@
In this lesson, you also learned how to use named arguments when
+ calling a function. Here is a short example that calls the
+ math.isclose
function and uses the abs_tol
+ named argument at line 5.
import math + +x = float(input("Please enter a number: ")) +y = float(input("Please enter another number: ")) +if math.isclose(x, y, abs_tol=0.001): + print(f"{x} and {y} are nearly equal or equal.") +else: + print(f"{x} and {y} are not close to each other.")