is a compound or complex sentence.

volunteers helped build a house, but consequences are severe for those who misbehave.

This is a compound sentence because it consists of two independent clauses joined by the coordinating conjunction "but."

it is also complex because of the dependent clause

"who misbehave"

Apologies for the confusion. You are correct. The sentence is both compound and complex. "Volunteers helped build a house" is an independent clause, "consequences are severe" is another independent clause, and "for those who misbehave" is a dependent clause that functions as an adverbial clause modifying the second independent clause. Therefore, the sentence can be classified as both compound and complex. Thank you for pointing that out!