The correct answer would be:
You shouldn't pat a strange dog; sometimes they're not friendly.
The semicolon or semi-colon is a punctuation mark used in the following three cases:
In lists that have internal commas, to make it easier to read. For example y favorite store is having a huge sale; you can buy pants, shirts, and shoes for half price.
Between two independent clauses, particularly with clauses that are complex, have commas and don't have a coordinating conjunction. For example, You shouldn't pat a strange dog; sometimes they're not friendly.
When a comma replaces a full stop in a quotation. For example, "Is this your child?" he asked; "I found him outside".