Skip to content

Instantly share code, notes, and snippets.

@swdevbali
Created June 8, 2017 03:01
Show Gist options
  • Save swdevbali/4562c83ca4b13938cd4ec34d3aadfc82 to your computer and use it in GitHub Desktop.
Save swdevbali/4562c83ca4b13938cd4ec34d3aadfc82 to your computer and use it in GitHub Desktop.
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