"The girls play violin, whereas the boys dance."
Translation:A lányok hegedülnek, a fiúk pedig táncolnak.
That makes a completely different meaning, so it should not be accepted.
In this situation, "pedig" needs to be in the second position, following the contrasting element ("a fiúk"). Imagine "the boys, on the other hand".
If you place "pedig" first, the sentence changes dramatically:
"The girls play the violin, even though the boys dance."