It's a funny story, but they screwed up the riddle. You need to know the answer to a yes/no question that this liar/truth-teller can answer. For example, which road should I take to get to the castle? You only have one question, so you can't ask are you a tree-frog, because then you wouldn't know which road to take.
From the subtitles:
The Professor here has come all this way to ask you a question.
He wants to see how well you can think...
...and what you have learned in these two years...
...and whether you can think logically. Will you answer him?
- Yes! - Good.
Kaspar...
...let's pretend that this is a village.
In this village live people who tell only the truth.
Here is another village.
The people here only tell lies.
Two paths run from these villages to where you are standing...
...and you are at the crossroads.
A man comes along, and you want to know which village he comes from...
...the village of the truthtellers or the village of the liars.
Now in order to solve this problem, to solve it logically...
...you have one question, and only one.
What is the question?
That's too difficult for him, how can he know that.
I admit, the question is thorny.
If you ask the man whether he comes from the village of truth...
...and he does, then he will say, truthfully, yes.
But if he comes from the village of lies, he will lie...
...and also answer yes!
Yet there exists one question which will solve the problem.
That's much to hard, too complicated.
You have one question, Kaspar...
...and only one, to solve this problem of logic.
I wouldn't know either.
If you can't think of the question...
...then I shall tell you.
If you came from the other village...
...would you answer 'no' if I were to ask you whether...
...you came from the liars' village?
By means of a double negative the liar is forced to tell the truth.
This construction forces him to reveal his identity, you see.
That's what I call logic via argument to the truth!
Well, I know another question.
You do?
There is no other question, by the laws of logic.
There isn't?
But I do know another question.
Let us hear it, then!
I should ask the man whether he was a tree-frog.
The man from the truth village would say:
No, I'm not a tree-frog, because he tells the truth.
The man from the liars' village would say:
Yes, I'm a tree-frog, because he would tell a lie.
So I know where he comes from.
No, that's not a proper question.
That won't do, I can't accept it as a question.
That's no logic; logic is deduction, not description.
What you've done is describe something, not deduce it.
But I understood his question.
Understanding is secondary; the reasoning is the thing.
In Logic and Mathematics we do not understand things...
...we reason and deduce: I cannot accept that question.