Skip to content

Commit

Permalink
Refactor triangle_area function to remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
Envestoren committed Mar 7, 2024
1 parent 06776df commit c79a40c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions area.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,4 @@ def circle_area(radius):
def triangle_area(base, height):
if base < 0 or height < 0:
raise ValueError('Base and height must be positive numbers')
return 0.5 * base * height

def
return 0.5 * base * height

0 comments on commit c79a40c

Please sign in to comment.