Artificial intelligent assistant

The condemned philosopher paradox. Can someone explain it to me? the following paradox is a variation of the Barber Paradox, I don't quite understand why this is a paradox so I'd like to hear you tell why, please. > There was a philosopher who had committed a crime (for example, he stared at a King's espouse) and he will be executed. The Benevolent King, though, allows the philosopher to choose if he wants be hanged up or beheaded, he only needs to tell a truth or a lie. The philosopher, then, says: I'll be beheaded. I'm lost, read this several times and couldn't find the paradox. I appreciate any help.

The full story should contain something like this: The King said: "If your statement is true, you will be hanged; if it is false, you will be beheaded instead."

Will he be hanged? If so, the statement turns out to be true, but then he will not be hanged according to the King's promise. Will he be beheaded? If so, that would make his prediction correct, so that he should be hanged, not beheaded.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 42e82ec1e0cee5dab245b729f6acf168