The sentence that is grammatically correct with the use of the elongated hyphens is, "Gideon and Francis took a difficult--but not interesting--science course." The phrase "but not interesting" is enclosed with the elongated hyphens because it serves as an additional information only, and does not affect the whole thought of the sentence if it is omitted. Long hyphens are used to set off additional information in the sentence, aside from using commas or parentheses.