Unfortunately its a key element in life, I mean most jobs will require your to work within a team, and yes, there will be people who do shit all and take equal credit at the end. Same goes with schooling, the only advice i have is that if you realise someone is not pulling their weight and you dont wish to confront them, simply tell teacher/lecturor/tutor/boss, though many wont do much, its worth a shot.