def compute_area(side)
# computing the area of a square with its corner cut off from the middle points of the sides
  square = side * side
  triangle = 0.5 * (0.5 * side) *(0.5 * side)
  area = square - triangle
  return area 
end

# we could do it using two separate functions

def triangle_area(base, height)
  return 0.5 * base * height
end

def square_area(side)
  return side ** 2
end

def compute_area(side)
  return square_area(side) -  triangle_area(0.5*side, 0.5*side)
end


