Skip to content

Commit 46963a8

Browse files
authored
Merge pull request #50 from UmiKami/04-Call-a-function
04 call a function
2 parents c2adf7b + 2621f89 commit 46963a8

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
def calculate_area(length,edge):
2+
return length * edge
3+
4+
# Your code Below this line:
5+
square_area1 = calculate_area(4,4)
6+
square_area2 = calculate_area(2,2)
7+
square_area3 = calculate_area(5,5)

exercises/04-Call-a-function/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ def test_call_calculate_area():
4848
path = os.path.dirname(os.path.abspath(__file__))+'/app.py'
4949
with open(path, 'r') as content_file:
5050
content = content_file.read()
51-
regex = re.compile(r"=(\s*)calculate_area\(")
51+
regex = re.compile(r"=(\s*)calculate_area\s*\(")
5252
assert bool(regex.search(content)) == True

0 commit comments

Comments
 (0)