One way to punctuate a compound sentence correctly is to join the two independent clauses with

a comma.
a semicolon.
a comma and a subordinating conjunction.
a semicolon and a coordinating conjunction.

1 answer

A compound sentence can be punctuated correctly by joining the two independent clauses with a comma and a coordinating conjunction.

For example: "I wanted to go for a walk, but it started to rain."

So, the correct option is a comma and a coordinating conjunction.