If used correctly you certainly wouldn't lose marks, no.
I know lots of people who swore in their controlled assessments and got top marks.
It's not like you're going to be penalised for it.
However, don't swear too much and make sure you only use it when necessary, as it might seem odd otherwise.
If there's a point that can be made better by swearing, why not, I suppose?
Saying that, if there's an alternative word you could use, you might be better to use that, ahah...