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.
cat w1.py
import wolframalpha
question = input("Question: ")
app_id = "7R3P9U-UWW4V3W35L"
client = wolframalpha.Client(app_id)
res = client.query(question)
anser = next(res.results).text
print(anser)
python3 w1.py
Question: pi to 15 decimals
3.141592653589793
python3 w1.py
Question: highest mountain in africa
Mount Kilimanjaro
(19341 feet)