Created
June 8, 2017 03:01
-
-
Save swdevbali/4562c83ca4b13938cd4ec34d3aadfc82 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("Let's calculate triangles area using function") | |
def calculate_triangle(bottom, height): | |
return bottom * height / 2 | |
tri1 = calculate_triangle(5, 10) | |
tri2 = calculate_triangle(6,8) | |
tri3 = calculate_triangle(10, 7) | |
print(tri1, tri2, tri3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment