Skip to content

Instantly share code, notes, and snippets.

@CodeDrome
Created March 25, 2022 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CodeDrome/47de35b84e7651be3e55586684f1ccb1 to your computer and use it in GitHub Desktop.
Save CodeDrome/47de35b84e7651be3e55586684f1ccb1 to your computer and use it in GitHub Desktop.
def square(side):
return side ** 2
def rectangle(width, height):
return width * height
def parallelogram(side, height):
return side * height
def trapezium(height, width_1, width_2):
return 0.5 * height * ( width_1 + width_2 )
def rhombus(height, width):
return 0.5 * height * width
def kite(height, width):
return 0.5 * height * width
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment