I have done lots of searching and never found it. This site pointed me to Tunnel in the Sky but that isn't it. I have very vague memories of the book and heck it might have been terrible but I know I liked it in the 6th or 7th grade!
I remember that it involved a class or group of kids having to take a final on another planet by surviving without any supplies. The environment I don't think was supposed to actually kill anyone but it did with lethal animals and such. The hero kid managed to survive and some foil the plot. As sad as this is I do remember something about him and the girl that fought with him making love in zero g as one of the lines near the end or at the end.