"Don't you drink coffee?"
It can have different meanings depending on the context. If I have just ordered tea after the rest of the group ordered coffee you might say "Don't you drink coffee?" meaning "don't you ever drink coffee". This is therefore seeking to confirm that I NEVER drink coffee and so is quite different to your suggested meaning which is seeking to confirm your understanding that I DO drink coffee, which is only likely to be said before we order. Both are valid in English, but which meaning is intended depends totally on context. I have no idea which of these is the intended meaning of the Mandarin in this exercise.
(to GregCannon2 and others)
How would you write "Don't you drink coffee?" in Chinese, then? if 你不喝咖啡吗？means rather "Do you not drink coffee?" then how would "Don't you drink coffee?" differ in Chinese?
I promise I'm not being snarky or asking rhetorically; rather, I'm genuinely wondering what difference you perceive in meaning between the two English sentences, and how you would express that difference in Chinese?
So is ”你喝咖啡吗?" Supposed to tranlsate to "Do you drink coffee?" And what Duolingo wants is "你不喝咖啡吗?" Which translates to "Don't you drink coffee?"
Also, isn't the meaning for these two phrases practically the same gramatically for both English and Chinese? Also isn't the second and correct phrase in this case a bit odd as the question is more indicative, rather than an open question which would be more applicable to daily life?
Regarding your first paragraph, I think you are correct: ”你喝咖啡吗?" is "Do you drink coffee?" and "你不喝咖啡吗?" is "Don't you drink coffee?"
As for (part of) the second paragraph, I, too, think that in English, "Do you drink coffee" is more of a simple question of fact, as long as there is no unusual stress on any of the words ("Do YOU drink coffee?" someone might ask a child); whereas, "Don't you drink coffee?" is more of what we call a "leading question" in English, a question that, in this case, assumes that the person does drink coffee, or perhaps even implies that perhaps the person should drink coffee, but I think the negative form of the question could be a question of mere fact as well.