Which sentences demonstrate correct use of commas with quotation marks?

Answer:
"Don't make me angry," Harry shouted, "or I'll really lose it!"
"You go look for Hagrid," said Hermoine.
Explanation:
In American English, these are the rules when it comes to the ways quotation marks and other punctuation marks are written:
When you're splitting a quotation in half, you should add a comma after the speaker to separate the speaker from the second part of the quote ("Don't make me angry," Harry shouted, "or I'll really lose it!").