Creating an "AutoPlacer" for prefabs?

I like to automate things as much as I can so I’m trying to do that with my new game. I have a plane and I have a tree prefab that I would like to be placed around the border, but at alternating heights (0, x, 0) and alternating rotations (0, x, 0). How could I create a script to place them in a straight line 1.5 units apart from each other with random heights between the range of (0.8-1.2) and random rotations?

Thanks in advance!

Use Random.Range(min, max) to randomize your positions/rotations like you said.

Then just pass those new randomized variables into the Instantiate function when you call it.