Saturday, June 21, 2025

Basic Flask web app

 from flask import Flask

app = Flask(__name__)


#In Flask, URL rules can be added using either the @app.route() decorator or the app.add_url_rule() method.


@app.route('/')

def hello_world():

   return '<center><h1><I>Hello World</I></h1></center>'


def bye_world():

   return '<center><h1><I>Bye World</I></h1></center>'


app.add_url_rule('/bye', 'bye', bye_world)


if __name__ == "__main__":

   app.run(debug = True)

No comments:

Post a Comment

Henry's law constant for CO 2 ​ in water is 1.67×10 ∘ Pa at 298 K . Calculate the quantity of CO 2 ​ in 500 mL , of soda water when packed under 2.5 atm CO 2 ​ pressure at 298 K .

  Explanation To calculate the amount of CO 2 ​ dissolved, we use Henry's Law: P = k H ​ × x _ C O 2 ​ where:\ P = partial pressure of...