If you ask someone a question, and he gives you an entirely accurate answer that is of no practical use whatsoever, he has just given you a Mathematician's Answer.

A common form of giving a Mathematician's Answer is to fully evaluate the logic of the question and give a logically correct answer. Such a response may prove confusing for someone who interpreted what they said colloquially.

Examples include questions involving "can you do [favor]...?" being interpreted as a hypothetical "are you capable of doing [favor]?" instead of its more common intent as a request to actually do it (this is a favorite of English teachers and Grammar Nazi, frequently going through something similar to "Can I come in?" "I don't know, are you able to?" "Uh, may I come in?") Another common form is when a character is asked "Is it A or B?" they will respond, "Yes" as if it was a question of Boolean logic rather than clarifying which specific one is the case (though this can also occur if the responder does not know the answer (but is sure at least one of them is correct), or considers both answers correct. This crops up a lot in Real Life, especially in the world of computers.)

Can be used by characters for reasons ranging from snarky humor to intentional obfuscation to being extremely Literal-Minded—AI and other Literal Genies by their nature are very likely to fall into the last category.

Its origins lie in the joke about a man in a hot-air balloon who asked someone where he was. "You're in a balloon," he answered. The rider concluded that it was a mathematician that said that, because the answer was perfectly correct and completely useless.

A commercial for Lyrica begins with a voiceover along the lines of: "I was wondering why I had muscle pain, so I asked my doctor. It turns out, connected to muscles are nerves which send pain messages to the brain."

A commercial for Budweiser (or Miller Draft) had a guy describe something as beautiful, refreshing, etc. as he was grabbing a beer near a woman. The woman asks if he was describing the beer, or her, his reply is "Yes."

A commercial for Grey Poupon mustard has one Rolls-Royce pull up to another, and they both roll down their windows. One man asks, "Pardon me, do you have any Grey Poupon?" The other replies, "But of course!" - then signals his chauffeur to drive away.

Mokona: *yawn* I slept well.Watanuki: What were you sleeping in there for anyway?Mokona: Uh... for about three years, I guess.Watanuki: That's not what I meant.

And also from a few moments later.

Watanuki: This is your idea of a party guest? What the heck is a Mokona?Yūko: Mokona is Mokona. Incidentally, you count them "one mokona," "two mokona", and then stop, there are only two.Watanuki:That's not an answer!

Of all people, Kyon's sister in Kyon: Big Damn Hero. Unsurprisingly, Yuki joins in later, when she and Haruhi forcibly undress Kyon. Yuki seems to do this fairly often.

Kyon: "So if I tell you, that means you can't go. Understand?"Kyon's sister: "Okay!" she cheered. "So, don't tell me! That means I can (it's not forbidden) go!"Kyon: He blinked at her. "That's not what--"

In It's a Wonderful Life, George asks the pregnant Mary, "Is it a boy or a girl?" Mary just nods enthusiastically.

In the 2006 Pink Panther movie starring Steve Martin, a reporter asks Inspector Clouseau if they (the police) know if the killer is a man or a woman. Clouseau's answer is: "Well of course I know that! What else is there, a kitten?"

Also, when he quotes someone about politics, Yvette asks him if he said it, meaning if he is the original author of he quote. Clouseau, of course, takes the question literally and, after confusingly looking around for someone else, answers "yes."

In The return of the Pink Panther, Clouseau doesn't know the location of his next destination, so he asks a person on the street "Do you know where X is?". The person answers "Yes" and keeps walking.

In The Pink Panther Strikes Again, Clouseau enters an inn, see a dog, he asks the innkeeper if his dog bites. The answer he gets is technically correct...

Clouseau: I thought you said he does not bite!Innkeeper: That is not my dog.

Sosa: Gilbert, you've either deliberately aided and abetted a federal fugitive's escape, or you're the single dumbest human being I've ever come into contact with. Would you like to know which way I'm leaning?Gilbert: Forward!

In Eragon, Brom and the titular character's first meeting with the witch Angela involves Mathematician answers as Brom successively asks her if she knows where the house of the person he is looking for is, and then would she tell him where it is, both her answers being in the affirmative. Brom and Eragon then stand there waiting until she looks up and tells them that, yes, she knows where the house is, and yes, she will tell them where it is, but they never directly asked her which house was the one they were looking for.

In Halo: The Fall of Reach, during a test of the MJOLNIR armor with shields Cortana asked the Master Chief what his plan was for dealing with a squad of ODST marines. He responded, "I'm going to finish counting to ten," because he had been instructed to do so.

One Vermont farmer approaches another. "My horse is sick. What did you give your horse when it was sick?" "Hay and molasses." Two weeks later: "I gave my horse hay and molasses, and it died." "Yep, so did mine."

Similarly, when the Senior Wrangler suggests that the mistletoe, while being genuinely symbolic, is only symbolic of mistletoe:

Archchancellor: That statement is either so deep it would take a lifetime to fully comprehend every particle of its meaning, or it is a load of absolute tosh. Which is it, I wonder?Senior Wrangler: [desperately] It could be both.Archchancellor: And that comment is either very perceptive, or very trite.Senior Wrangler: It could be bo-Archchancellor: Don't push it, Senior Wrangler.

And earlier in Hogfather:

Lord Downey: Can I offer you a drink?Auditor: Yes ... we judge you capable of performing that action

Demons were like genies or philosophy professors - if you didn't word things exactly right, they delighted in giving you absolutely accurate [...] answers.

As mentioned in Hogfather, when questioned about the origins of life, the philosopher Didactylos set forth this theory:

Things just happened. What the hell?

The real problem with Mathematician's Answers in Discworld is that they often AREN'T -- they're very accurate statements of the fact that, in a world where symbolism, belief, and narrative causality are literally physical laws of the universe, it is entirely possible for something to be two different and contradictory things simultaneously.

The Hitchhiker's Guide to the Galaxy: When Zaphod learns that Marvin is waiting for them in the car park at the Restaurant at the End of the Universe (and has been for several trillion years), he asks what he's doing there. Marvin's answer? Parking cars. What else would he be doing there?

More literally: "42". For those that don't know about this, an alien race constructs a massive supercomputer in order to learn "The answer to the question of Life, the Universe, and Everything". The computer, after centuries seven and a half million years of computation, comes back with "42". When asked about this, the computer responds that it is able to figure out the answer, but they need another computer to calculate what the question is. The programmers, afraid of the mob's reaction to this nonsense, just make up the question: "How many roadsmust a man walk down?"

Arthur has one as well:

Arthur Dent: You know, it's at times like this, when I'm stuck in a Vogon airlock with a man from Betelgeuse, about to die of asphyxiation in deep space, that I really wish I'd listened to what my mother told me when I was young.Ford Prefect: Why? What did she tell you?Arthur Dent: I don't know! I didn't listen!

In Life, the Universe and Everything, there is the character Prak. In a court case, he was injected with too much truth serum, and then he was instructed to tell "the Truth, the Whole Truth, and Nothing But the Truth." He responds by telling them everything that is true about, well, Life, the Universe, and Everything. Everyone present had to flee, leaving him alone telling the Truth, however by the time the protagonists arrive he has finished, telling them that there's not as much to it as one might expect, that he has forgotten it all now, but some of the best bits involved frogs and Arthur Dent.

Jarlaxle the drow from R.A. Salvatore's series of Drizzt books is so fond of the Mathematician's Answer that "Yes" might as well be his catch phrase.

Animorphs After being told by the resident friendly alien member of the team that they have all been dragged through a fracture in space-time continuum

Jake: Did we go forward or back? Are we in the past or the future?Ax: Yes. It's definitely one of those two choices.

Yet another of Peter David's favorite literature tricks to tweak the nose of higher-class people (especially Vulcans in his Star Trek novels): The high-class person asks, "May I ask where you're going?" The person answers, "Yes". It takes the Vulcan a second to comprehend.

This is one of the things Hawklords are known for. It's also why Vlad would have killed Daymar out of sheer annoyance if it wasn't for his invaluable psychic skills.

In David Weber's Safehold series, Nimue/Merlin's AI assistant Owl persists in responding to her/his questions with literal answers, despite the manufacturer's assertion that it's supposed to learn to reply colloquially. It finally begins to show some improvements in the fourth book, A Mighty Fortress.

"Be careful what she teaches her," Adams said, without looking up. "You might get a very nasty surprise."
"Are you talking about Anastasia teaching Katya or the other way around?" Nielson asked, grinning.
"Yes."

In Isaac Asimov's Black Widowers story Truth to Tell the monthly guest, a man who never tells a lie, is suspected of a crime which it seems only he could have committed, but he continually denies it, saying: "I didn't take the cash or the bonds." However the waiter, Henry, asks him: "Did you take the cash and the bonds?" The guest declines to answer and leaves.

Actually, in logic we have the "exclusive or", which (as the name implies) excludes "and". But exclusive or is denoted differently to inclusive or, obviously, and they didn't ask "Did you take the cash XOR the bonds?".

The same quandary is inverted in Simon R. Green's Wolf in the Fold, when Hawk and Fisher question suspects about the two murders under a truthspell. All the suspects can correctly answer "No" when asked if they murdered Victim #1 and Victim #2, because the two deaths were the handiwork of different killers.

An example where this is not played for laughs occurs in The Dresden Files novel Small Favor, when Harry brings the injured Valkyries Gard to Michael Carpenter's house for treatment. Michael's fellow Knight Sanya is there and is examining Gard, noting that she is more than human. He asks "The woman. What is she?" to which Harry responds "Injured." Sanya understands the implied rebuke immediately and apologizes.

Shadow: Where are we? Am I on the tree? Am I dead? Am I here? I thought everything was finished. What's real?Whiskey Jack: Yes.Shadow:Yes? What kind of an answer is Yes?Whiskey Jack: It's a good answer. True answer too.

Shadow gets one from Sweeney as well

Sweeney: [performs an elaborate coin vanishing trick]Shadow: We have to talk about that. I need to know how you did it.Sweeney: I did it with panache and style.

How Rude!, an etiquette book aimed at teenagers, contains an anecdote from the author. He attempted to call a friend of his and the friend's five-year-old son answered. When the author asked if his daddy was there, the boy replied, "Yes."

Kosh: They are alone. They are a dying people. We should let them pass.Sinclair: Who? The Narns or the Centauri?Kosh: Yes.

Everything that Kosh says is not exactly helpful:

Sheridan:"How do I know you're the same Vorlon? Inside that encounter suit, you could be anyone."Kosh:"I have always been here."Sheridan:"Oh yeah? You said that about me, too."Kosh:"Yes."Sheridan:"I really hate it when you do that."Kosh:"Good."

In one case, Sheridan had asked what was in the random access hatch Kosh had led him to. Kosh's answer was "One moment of perfect beauty." Sheridan lampshades this: "Well, as answers go, short, to the point, utterly useless and totally consistent with what I've come to expect from a Vorlon." It turns out, this is a completely factual statement, though it makes no sense until you can see the context. This gets Lampshaded again in the same episode when Ivanova asks Sheridan what Kosh showed him. Sheridan responds "Beauty...in the dark." Ivanova remarks that Kosh's lessons must be working, because Sheridan is starting to talk like a Vorlon.

The Drakh do the same in season 4: "Drakh? Is that your name or your species?" "Yes."

The French-Canadian sitcom Un Gars, Une Fille (A Guy and a Girl), has the titular Guy ask his girlfriend which of two wines she wants for supper. She answers "Yes." This prompts him to reply "When someone gives you a choice between two things, you can't answer with yes! If you're afraid of committing to a decision, do you want me to pick for you, or do you want me to leave choices up to you?" Her answer? "Yes! Yes Yes Yes!"

Star Trek has come up with the Heisenberg compensator, allowing the transporter to get around the Heisenberg uncertainty principle. When asked how it works, Mike Okuda's response was '[It] works just fine, thank you.'

On Deep Space Nine, Odo is asked by Lwaxana Troi if Odo is his first or last name. Yes, it is.

In a later episode, we get to know that Odo is his first name. His second is Ital. (The Cardassian word Odo'ital means "Unknown Sample," which is exactly what he was to the scientists who discovered him.)

Well, he was named on Bajor, where the Eastern name order is accepted, so it's still Mathematician's.

On an episode of Star Trek: The Next Generation, Wesley talks to The Custodian (a computer), after having been told he's allowed to ask of it any question:

Wesley: Custodian, can you show me where Harry is?The Custodian: Yes.Wesley: Custodian, show me Harry.

Doctor: Are you married, River?River Song: Are you asking?Doctor: Yes.River Song: Yes.Doctor: No, hang on. Did you think I was asking you to marry me, or asking if you were married?River Song: Yes.Doctor: No, but was that yes, or yes?River Song: Yes.

From "The Two Doctors"

Doctor: I closed my respiratory passages as soon as I detected any danger.Peri: Well, then how did you breathe?Doctor: With difficulty.

Similarly, from "The Doctor's Wife"

Amy: How do you leave the universe?Doctor: With enormous difficulty!

In "A Good Man Goes To War", we meet Madame Vashtra, a female Silurian in the late 1800s:

Given a serious purpose in an episode of The West Wing, when Oliver Babish is preparing C.J. to answer questions before Congress:

Babish: Do you know what time it is?C.J.: It's five past noon.Babish: I'd like you to get out of the habit of doing that.C.J.: Doing what?Babish: Answering more than was asked... Do you know what time it is?(C.J. stares at him silently for several moments)C.J.: Yes.

Though also played for laughs when Will is attempting to obfuscate an angry general:

General: Are you rewriting the foreign policy section?Will: Yes.General: Dramatically?Will: I like to think I have a certain flair...

Leonard: How was Nebraska?Penny: Well, better than North Dakota!
(no one laughs)Penny: I guess that joke's only funny in Nebraska.Sheldon: From the data at hand, you really can't draw that conclusion. All you can say with absolute certainty is that that joke is not funny here.

Neil: (answering the phone): Someone's asking if we know the name of a short fat comedian.Mike: Yes.Neil: (into the phone): Yes we do! (puts the phone down).

Another:

Vyvyan: 11:05 and it's still raining. I wonder how hard it is.Rick: Not very hard, seeing as it's only made of water.

Mike walks in holding a fish. He asks "What is this!?" Everyone else replies, "A FISH!" He realizes they are right and leaves. Later in the episode he comes back with the fish, having figured out what he meant to ask. He asks, "What is this fish doing in my bed!?" Someone points out to him it is not in his bed, he is holding it in his hands. He realizes they are right and leaves. Still later, he comes back, sure he has figured it out for good, with NOTHING in his hands. He says, "What is this fish doing in my bed!?" Everyone says, "WHAT FISH?"

Still another:

Girl: Oh, is that the time?Mike: No, that's a wristwatch. Time is abstract concept.

Stephen: There are things I don't tell you.Steve: Oh, you tell me everything.Stephen: No, I don't.Steve: Like what?Stephen: I can't tell you.Steve: Well, does it involve you or me?Stephen: Yes.Steve: Who? Me, or you?Stephen: Steve, we've exhausted this topic.

Another example: In 2003, when Prince Charles was alleged to have had a gay experience, Britain's strict libel and slander laws prevented anyone from commenting publicly on the charge. Colbert, doing a report on the scandal, was asked by Jon Stewart if he had learned any specifics. Colbert said, "Yes I have, Jon."

In Smallville, when Clark wants to talk to Lois about their relationship:

Clark: Lois, what are we doing?Lois: I'm eating a maple donut and and you're kind of invading my personal space.

Ron: What am I not hearing?Roman: I don't know... a squid? There are other options...

To clarify, Roman is supposed to be DJ and is not at his post.

In Get Smart, One of Maxwell Smart's many catchphrases is a mathematician's answer. When asked how he did something, or how he planned to do something, he would respond: "With great difficulty."

Cheers: Cliff Claven attempted to use such an answer on Jeopardy! when asked to identify three actors by their original, non-stage names. His reply was "Who are three people who have never been in my kitchen?" Correct, but ...

Another from Cheers:

Frasier: O death in life, the days that are no more -- who said that?Woody: Who said what?Frasier: "O death in life, the days that are no more."Woody: You did.Frasier: No, I mean, who said it first?Woody: You said it both times.

Another Cheers' example had Cliff give a long and detailed explanation about why they drank ice cold beer in the middle of winter (which essentially centred around the need to equalise your internal and external temperatures). When he had finished, carla then asked him why they also drank it summer. His response was "What else are we going to do with it?".

In episode six of the first season of Boardwalk Empire, Margaret tells a friend in the Temperance League that a man has made her an ofter. The friend asks, "Financial? Domestic? Sexual?", and Margaret replies, "Yes."

An Running Gag in Police Squad!, where Frank holds a cigarette out to a witness or suspect and asks "cigarette?" The implication is that he's asking if they want one, but they always answer "Yes, I know," or "Yes, it is."

Mock the Week has a Jeopardy! parody called If This is the Answer, What is the Question?, which naturally wound up like the Jeopardy example above on occasion.

Miss Wormwood: Calvin, pay attention! We're studying geography! Now, what state do you live in?Calvin: Denial.Miss Wormwood: ...I don't suppose I can argue with THAT.

Bloom County has one in its first series about the Presidential election. Trying to find a local candidate, Milo asks the bum Limekiller "How do you stand on nuclear waste?" Limekiller immediately begins balancing awkwardly on one foot, earning Milo's approval.

In Twelfth Night, when Malvolio tells Olivia that a man wants to see her and will not be turned away:

Olivia: What kind of man is he?Malvolio: Why, of mankind.Olivia: What manner of man?Malvolio: Of very ill-manner.

Also, when Viola meets Feste:

Viola: Save thee, friend, and thy music: dost thou live by thy tabour?Feste: No, sir, I live by the church.Viola: Art thou a churchman?Feste: No such matter, sir: I do live by the church; for I do live at my house, and my house doth stand by the church.

In Dragon Age II, a sidequest has Hawke go fetch some pickaxes for a group of miners from a smith in town whose name they forgot.

Hawke: Are you the smith?Smith: I'm a Smith.Hawke: Is "Smith" your name or your profession?Smith: Yep.

Done beautifully in Arcanum: Of Steamwork and Magick Obscura when you try to get the location of the Hidden Elf Village Quintarra from Myrth the Elf. He repeatedly answers "In the Glimmering Forest" (said forest covers a third of Arcanum) and "In the trees" while being delighted at your frustration. When you give up, you turn it back on him:

Myrth: "Why do you want to know, if you don't mind me asking?"You: "No, I don't mind at all that you're asking."Myrth: Well?You: ...Myrth: Aren't you going to answer?You: ...Myrth: Out with it, man/woman!You: I said I didn't mind you asking, not that I'd answer.

The third generation Pokémon games will let you answer yes or no...to the question of where your character came from. If you answer "yes," he'll reply that he's never heard of Yes Town. If you say no, he'll say that you have to have come from somewhere.

Same deal in EarthBound. Someone asks you to name a Beatles song - XX Xterday. If you say Yes, that is technically correct. If you say No, the asker answers that Noterday is just wrong.

Fan: What did the Court do with Sivo's body? ... Was Sivo laid to rest somewhere near the Court, or were his remains sent to an Orjak burial ground in the Bovec Mountains or elsewhere?Tom Siddell: Eglamore dealt with the matter in the way agreed on between he and his friend.
...Fan: I like how most characters have slightly different skin colors. But because they do, I'm not sure what to make of Zimmy's ashen color. Do you consider it to be in the expected range of variation for Gunnerkrigg characters (it does seem like the Headmaster's is quite similar), or is it intended to suggest something like unhealthiness or unnaturalness or even just griminess?Tom Siddell: Yup.

"Davan, I'm going to force self-worth into you if I have to do it with a suppository."
"Be gentle, it'll be my first time."
"First time to be rectally violated or first time to feel good about yourself?"
"Yes."

Spoony: Quite a long way from the traditional kimono she wore before, and her previous characterization as a kind, demure, religious care-giver with a tragic fate. But is this huge change in outfit and characterization because of the radical cultural shift in Spira because of the exposure of Yevon as a maniacal, genocidal cult run by the undead bent on world domination... or just because japanese perverts want to see some cleavage and her cute ass in boy's shorts? Good question... The answer is "Yes".

Adam West: Will you answer one question for me?.Medium: YesAdam West: Thank you so much.

West himself loves doing this:

Tricia Takanawa: Mr. West, do you have any words for our viewers?Adam West: Box, toaster, aluminum, maple syrup... no I take that one back. I'm gonna hold onto that one.

He has it done to him in "Petoria:

(Peter is dancing in the park and generally causing a commotion.)Adam West: What in God's name is he doing?!Cleveland: I believe it's called the Worm.

In one episode of The Charlie Brown and Snoopy Show, Charlie Brown regains consciousness on a sidewalk as two little kids watch. Charlie gets up and asks one of the kids, "Where am I?" One of the kids points to him and says, "Right there!"

Avatar: The Last Airbender: Series finale, Aang does his Avatar mojo and summons the spirit of Avatar Roku to advise him on whether he should kill Ozai. Roku's only advice is to "be decisive".

Some of the other Avatar spirits that Aang consulted were more direct, but he didn't like what they had to say.

Rocky and Bullwinkle provides us with another example. Boris, in one of his Paper Thin Disguises, needs Bullwinkle to go to a particular location. His scheme is to have Bullwinkle win a trip in a contest. The trick, then, is to get the exceedingly dense Bullwinkle to actually give the correct answer to a question, which he finally accomplishes with this exchange.

Boris: Do you know who is buried in Grant's tomb?Bullwinkle: No.Boris: That's right, you don't!

The Simpsons provides a variation on the theme, but still very much holds the original idea. When Bart and Milhouse get their own warehouse, Milhouse is left behind as a night watchman. Bart comes back the next day to find the place destroyed.

Bart: Milhouse, how could you let this happen? You were supposed to be the night watchman!Milhouse: I was watching. I saw the whole thing. First it started falling over, then it fell over.

Batman: The Animated Series played with this one. Alfred and an old compatriot of his had been captured and injected with Truth Serum. When the serum starts to take effect, Alfred appears to be drunk off it. When the bad guy asks, "What's the second password?", he replies "The walrus and the unicorn..." Turns out Alfred was faking inebriation as the password was exactly what he said.

On an episode of Garfield and Friends in a U.S. Acres segment, Wade is being his usual cowardly self, this time about seeing a doctor. Orson tries to reassure him, but Roy can't miss an opportunity to have a laugh at his expense.

Orson: Doctors are your friend Wade, they'd never hurt you, but Roy here would. Wait a minute, Roy, you're not a doctor!Roy: Sure I am! I operated a guy just yesterday.Orson: What did you operate him for?Roy: 900 dollars. (rimshot)Orson: What did he have?Roy: 900 dollars. (rimshot)Orson: What did you REMOVE from him?Roy: 900 dollars! (rimshot)Orson: No, what was he COMPLAINING about?Roy and Orson: The 900 dollars. (rimshot)Orson: I guess you really are a doctor, Roy.

A famous one by mountaineer George Mallory: when asked, "Why do you want to climb Mount Everest?", he retorted, "Because it's there". It's since been called, "the most famous three words in mountaineering".

From an old Marvel Comics trading card:

Spider-Man: So your name is Logan. Is that your first or last name?Wolverine: Yup.

At the time, Wolverine's real name had yet to be revealed. He sometimes went by "Logan L. Logan". Guess what the "L." stands for.

A kōan of Zen Buddhism reads: A monk asked Zhàozhōu, "Does a dog have Buddha nature or not?" Zhàozhōu said, "Wú." This is a rare example in which the mathematician's answer is actually the most useful one. Wú essentially means "null", the point being that the monk asking the question is wrong to assume that the two dichotomous categories have any meaning.

Paris: Dad, found this woman!Priam: Whoa, where's she from?Paris: She's from Sparta!Priam: ...Agh, you twit. Nip upstairs, see if there are any ships on the horizon.Paris: Right. [he does] Uhh... Ships. Yeah, yeah, there's ships.Priam: Well, how many?Paris: *thinking noises* ...all of them.

According to a joke, a helicopter is lost in the fog and the pilot shows a sign to the people in the nearby skyscraper, asking them where he is. The answer: "You are in a helicopter." Ironically, the answer does prove useful, since a skyscraper filled with people who all play by this trope can only be the Microsoft tech support building.

The tech people have their own version of this joke:

Man in helicopter: Excuse me, where am I?Passerby: You're in a helicopter about 20 ft. off the ground.Man in helicopter: You must be in tech support.Passerby: I am. How did you know?Man in helicopter: Your answer was technically correct but completely useless.Passerby: You must be a businessman.Man in helicopter: I am. How did you know?Passerby: Because you don't know where you are or where you need to go, but you expect me to be able to help. You're no worse off than you were before, but now you think it's my fault.

The proper way to choose a cantaloupe has been described as: smell it, and if it smells like a cantaloupe, it is ripe enough. But it is a cantaloupe, so by definition, whatever it smells like, is what a cantaloupe smells like. Therefore, the only logical answer to "Does it smell like a cantaloupe?" is "Yes".

The provided description actually implies that an unripe cantaloupe does not smell anything at all.

Which is why outside of the U.S. they are known as a musk mellon. A proper cantaloupe as recognized by the rest of the world can't even be found in the U.S.

Robin Williams in his stand-up act when talking about calling tech support. When finally reaching a real person (who is Indian, of course), this exchange takes place:

Caller: (overjoyed) Where are you!?Tech support assistant: (heavy Indian accent) I am on the phone with you.

Back in about 2003, when Mark & Lard were still doing an afternoon show on BBC Radio 1, they used to run a phone-in quiz vaguely about music. Once, one of the questions was, "Can you name a member of Boyzone?" One of the callers jumped in with, "No." Technically, it was a correct answer...

If you got here from Internet Backdraft, you're probably wondering why "the cake is a lie, but pi is always true". The point of the joke is that in many settings, especially computer programming, "false" is represented by the value 0 and "true" by any other value. Pi isn't zero, so it's true. A related joke quoted on Bash.org:

person A: What does your dad do for a living?
person B: My dad's dead.
person A: Well, what did he do before he died?
person B: He sorta cluched at his chest and fell over.

Dara Ó Briain did a bit about this in one of his stand-up shows, when the audience response to the question "Do you know what Moore's Law is?" was 'yes'.

There is a story about actress Mae West, who was famous for playing The Vamp.

Interviewer: Do you like your men short, tall, fat, or thin?Mae West: Yes.

There's an old joke about asking for directions that goes along these lines:

Driver: Excuse me sir, but does this road go to London? (Or the name of any place)Pedestrian: This road, sir? No, sir. Tends to stay right where it is.

There's another old joke, where a tourist lost in New York asks a street musician for directions:

Tourist: Excuse me, sir. How do I get to Carnegie Hall?Musician: Practice, man! Practice!

Then there's the old retort to "Can I ask you a question?" "You just did."

During the trial arc of Schlock Mercenary, the company lawyer manages, through convoluted wordplay, to ask if he can ask a question without, in fact, asking a question. Petey, duly impressed with this feat, allows it.

Not so much an example but a possibly interesting piece of related trivia: The "-A or B?; -Yes" joke works in most languages because it's rather typical that only one word is used for both meanings of "or". It doesn't work in languages where there are separate words for them, for example Finnish ("tai" / "vai". The former means "or" as in "is it either A or B?" and the latter as in "which one is it: A or B?")

In fact, Finnish also has a third word for "or": "eli" meaning specifically "also known as" or "in other words". One wonders if the early Finns just really hated the "or" jokes.

It's also difficult in Chinese, but for a completely different reason: Chinese does not have all-purpose words for "yes" and "no," instead attaching positive or negative modifiers to the verb in question. If someone asks you even a single-mode question, like "Have you eaten" ("chī fàn le?"), you have to say, "bù chī" (have not eaten) or "chī le" (already ate). ...Okay, people will still throw around "bù" without an attached verb, same as how English speakers will say "Went to the store" with only an implied subject, but it's still a bit harder to be ambiguous.

Actually, the (typical) negative response to the question "Have you eaten" ("chī fàn le méi?") would be something like "hái méi chī" (haven't eaten yet). Replying "bù chī" means "I don't eat", which would only be a valid response if the person replying indeed doesn't eat at all.

This is the reason some computer languages have the XOR keyword. "OR" allows for one or two options to be "true". "XOR" specifies that only one can be true.

Interestingly enough, this can still lead to a Mathematician's Answer. Q: "Is it black XOR white?" Yes: it's either one or the other. No: it's either both or neither.

You've probably met the occasional smartass who thought they were funny by using these. "What's for lunch?" "Food."

Teachers see a lot of these, from students who can't come up with a relevant answer to a test question and opt to try for a laugh instead.

Engineer: Look, sheep in Scotland are black.Physicist: Well, all we know for sure is that some sheep in Scotland are black.Mathematician: All we can be sure of is that, in Scotland, there is at least one sheep that is black on at least one side.

Or this joke (when sitting at the table): "Can I have the butter?" "Yes." "Can you pass it to me?" "Yes." (beat) "What, now?"

"Why you so head-up, Tom?" "Oh, I had to shoot my dog." "Oh, was he mad?" "Guess he weren't too damn pleased."

"I'm going up to Portland." "Go ahead. I won't stop you." "Where does this road go?" "Don't go nowhere, mister. Stays right here." "Can I take this road up to Portland?" "Well, sure...but they've got all the roads up to Portland that they need."

"Sorry to hear they're burying your pa." "Got to. He's dead."

This joke: A mathematician, a physicist and an engineer are each staying in hotel rooms which individually catch fire. They each have water nearby, so the engineer throws as much water as he can onto the fire and it goes out, then he goes back to bed. The physicist does some quick calculations and throws the exact amount of water necessary onto the fire so that it will go out and he doesn't waste any, and then he goes back to bed. The mathematician does some quick calculations, exclaims "Aha! There is an answer!" and goes back to bed.

According to an Urban Legend, when the notorious bank robber Wille Sutton was asked why he robbed banks, he replied "Because that's where the money is." He denied ever saying this.

Magritte's painting The Treachery of Images, which shows a pipe with the phrase, "Ceci n'est pas une pipe" (this is not a pipe) under it. And, of course, it isn't a pipe; it is an image of a pipe. Later in life, Magritte made it clear that this was an Mathematician's Answer:

The famous pipe. How people reproached me for it! And yet, could you stuff my pipe? No, it's just a representation, is it not? So if I had written on my picture "This is a pipe," I'd have been lying!