import wolframalpha
import wikipedia

while True:
    input = input("Question: ")

    try:
        app_id = "8UHTA8-5QGXGEJ4AT"
        client = wolframalpha.Client(app_id)
        res = client.query(input)
        answer = next(res.results).text
        print (answer)
    except:
        result = wikipedia.summary("India")
        # printing the result
        print(result) 


f8505ec84826ce94c3031584d5433d86b80fcd64
<mask token>

<mask token>
while True:
    input = input('Question: ')
    try:
        app_id = '8UHTA8-5QGXGEJ4AT'
        client = wolframalpha.Client(app_id)
        res = client.query(input)
        answer = next(res.results).text
        print(answer)
    except:
        result = wikipedia.summary('India')
        print(result)

import wolframalpha
import wikipedia
while True:
    input = input('Question: ')
    try:
        app_id = '8UHTA8-5QGXGEJ4AT'
        client = wolframalpha.Client(app_id)
        res = client.query(input)
        answer = next(res.results).text
        print(answer)
    except:
        result = wikipedia.summary('India')
        print(result)

import wolframalpha
import wikipedia

while True:
    input = input("Question: ")

    try:
        app_id = "8UHTA8-5QGXGEJ4AT"
        client = wolframalpha.Client(app_id)
        res = client.query(input)
        answer = next(res.results).text
        print (answer)
    except:
        result = wikipedia.summary("India")
        # printing the result
        print(result) 

