input: Write a python function to generate a tree structure based on its height.
  assert generate_tree(3) == "  * \n * * \n* * * \n"
  assert generate_tree(5) == "    * \n   * * \n  * * * \n * * * * \n* * * * * \n"
  assert generate_tree(1) == "* \n"
output: def generate_tree(height):
      tree = ""
      for i in range(height):
          spaces = ' ' * (height - i - 1)
          stars = '* ' * (i + 1)
          tree += spaces + stars + '\n'
      return tree