From 18e55ab631b540fccd058b67226af0b2e49261fa Mon Sep 17 00:00:00 2001 From: Hankun Xiao Date: Mon, 18 Nov 2024 10:28:17 -0800 Subject: [PATCH 1/2] made a better message --- sqrt.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sqrt.py b/sqrt.py index 6560811..6ae62a4 100644 --- a/sqrt.py +++ b/sqrt.py @@ -9,6 +9,8 @@ @click.command() @click.option("--n", type=int, required=True, help="Number for which the square root should be calculated") def main(n): + if n < 0: + raise Exception("n should not a positive number") print(math.sqrt(n)) if __name__ == "__main__": From bfc90bca4ff5ac4aa5363d8373bec707a626e6aa Mon Sep 17 00:00:00 2001 From: Hankun Xiao Date: Mon, 18 Nov 2024 10:46:05 -0800 Subject: [PATCH 2/2] Test Inline Comment --- sqrt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqrt.py b/sqrt.py index 6ae62a4..2c5c4d0 100644 --- a/sqrt.py +++ b/sqrt.py @@ -12,6 +12,6 @@ def main(n): if n < 0: raise Exception("n should not a positive number") print(math.sqrt(n)) - +# Test Inline Comment if __name__ == "__main__": main()