contestada

Because the test was difficult, we had to study for hours. would this be a fragment sentece. How would I rewrite this sentence.