From f9e7bcf9750a18bf4be98d43d3c8035369f97e8f Mon Sep 17 00:00:00 2001 From: oceanicm <62816887+oceanicm@users.noreply.github.com> Date: Fri, 11 Aug 2023 12:22:22 -0400 Subject: [PATCH] add calculate_square function --- src/functions/calculate_square.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/functions/calculate_square.py diff --git a/src/functions/calculate_square.py b/src/functions/calculate_square.py new file mode 100644 index 00000000..fefba796 --- /dev/null +++ b/src/functions/calculate_square.py @@ -0,0 +1,11 @@ +def calculate_square(number): + square= number*number + return square +# Test Case: +def test_calculate_square(): + assert calculate_square(0)==0 + assert calculate_square(1)==1 + assert calculate_square(2)==4 + print("All test cases passed") + +test_calculate_square() \ No newline at end of file