sphinxy.riddle module#

class sphinxy.riddle.Riddle(question: str, answer: str)#

Bases: object

answer: str#
check_answer(answer: str) bool#

Evaluates given answer against the actual riddle answer.

Parameters:

answer (str) – The answer to the riddle question.

Returns:

The result of the evaluation; True if answer is correct, False otherwise.

Return type:

bool

get_hint() Iterator[str]#

Gives the next letter of the answer as a hint to the question

Yields:

Iterator[str] – The next character of the answer.

question: str#