I ran your code as is without issue, see below.
As others have mentioned it doesn't work
is of zero use for folks to help, so supply the question you asked and a trace of everything that happened, folks might then be able to advise.
question = input("Question: ")
app_id = "7R3P9U-UWW4V3W35L"
client = wolframalpha.Client(app_id)
res = client.query(question)
anser = next(res.results).text
Question: pi to 15 decimals
Question: highest mountain in africa