best python framework

Do you mean best python web framework?
If it is, then use Flask or Django.

Here is what the above code is Doing:
1. It is asking the user to input a question.
2. It is printing out the question.
3. It is asking the user to input an answer.
4. It is printing out the answer.