from flask import Flask, render_template import math import random app = Flask(__name__) @app.route('/') def welcome(): return '''
{x}2 is {x2}
'.format(x=n,x2=n*n)) @app.route('/sqrt/{x} is the square root of {y}'
.format(x=math.sqrt(abs(n)),y=n))
@app.route('/country/ {city} is the capital of {country}'
.format(city=city,country=known[city]))
else:
return (''' I don't know the country whose capital is {city}'''
.format(city=city))
if __name__ == '__main__':
import os
uid = os.getuid()
app.debug = True
app.run('0.0.0.0',uid)