from flask import Flask, render_template
from flask_ask import Ask, statement
import random

app = Flask(__name__)
ask = Ask(app, '/')

@ask.intent('RandomNumber', convert={'lowerLimit': int, 'upperLimit': int})
def hello(lowerLimit, upperLimit):
	if lowerLimit == None:
		lowerLimit = 0
	if upperLimit == None:
		upperLimit = 100
	number = random.randint(lowerLimit, upperLimit)
	text = render_template('random_number', lowerLimit=lowerLimit, upperLimit=upperLimit, number=number)
	return statement(text).simple_card('Flask-Ask Random Number', text)

if __name__ == '__main__':
    app.run(debug=True)
[((99, 114), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (104, 114), False, 'from flask import Flask, render_template\n'), ((121, 134), 'flask_ask.Ask', 'Ask', (['app', '"""/"""'], {}), "(app, '/')\n", (124, 134), False, 'from flask_ask import Ask, statement\n'), ((341, 379), 'random.randint', 'random.randint', (['lowerLimit', 'upperLimit'], {}), '(lowerLimit, upperLimit)\n', (355, 379), False, 'import random\n'), ((388, 486), 'flask.render_template', 'render_template', (['"""random_number"""'], {'lowerLimit': 'lowerLimit', 'upperLimit': 'upperLimit', 'number': 'number'}), "('random_number', lowerLimit=lowerLimit, upperLimit=\n    upperLimit, number=number)\n", (403, 486), False, 'from flask import Flask, render_template\n'), ((490, 505), 'flask_ask.statement', 'statement', (['text'], {}), '(text)\n', (499, 505), False, 'from flask_ask import Ask, statement\n')]