diff --git a/exercises/04-Call-a-function/solution.hide.py b/exercises/04-Call-a-function/solution.hide.py new file mode 100644 index 0000000..d02eb4a --- /dev/null +++ b/exercises/04-Call-a-function/solution.hide.py @@ -0,0 +1,7 @@ +def calculate_area(length,edge): + return length * edge + +# Your code Below this line: +square_area1 = calculate_area(4,4) +square_area2 = calculate_area(2,2) +square_area3 = calculate_area(5,5) \ No newline at end of file diff --git a/exercises/04-Call-a-function/tests.py b/exercises/04-Call-a-function/tests.py index cbd4870..52dc7d3 100755 --- a/exercises/04-Call-a-function/tests.py +++ b/exercises/04-Call-a-function/tests.py @@ -48,5 +48,5 @@ def test_call_calculate_area(): path = os.path.dirname(os.path.abspath(__file__))+'/app.py' with open(path, 'r') as content_file: content = content_file.read() - regex = re.compile(r"=(\s*)calculate_area\(") + regex = re.compile(r"=(\s*)calculate_area\s*\(") assert bool(regex.search(content)) == True \ No newline at end of file