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)
[((5, 6, 5, 21), 'flask.Flask', 'Flask', ({(5, 12, 5, 20): '__name__'}, {}), '(__name__)', False, 'from flask import Flask, render_template\n'), ((6, 6, 6, 19), 'flask_ask.Ask', 'Ask', ({(6, 10, 6, 13): 'app', (6, 15, 6, 18): '"""/"""'}, {}), "(app, '/')", False, 'from flask_ask import Ask, statement\n'), ((14, 10, 14, 48), 'random.randint', 'random.randint', ({(14, 25, 14, 35): 'lowerLimit', (14, 37, 14, 47): 'upperLimit'}, {}), '(lowerLimit, upperLimit)', False, 'import random\n'), ((15, 8, 15, 101), 'flask.render_template', 'render_template', (), '', False, 'from flask import Flask, render_template\n'), ((16, 8, 16, 23), 'flask_ask.statement', 'statement', ({(16, 18, 16, 22): 'text'}, {}), '(text)', False, 'from flask_ask import Ask, statement\n')]