To create a Flask app that multiplies two numbers that the user inputs, follow these steps:
Install Flask using pip: pip install flask
Import Flask and request modules in your Python code:
main.py33 chars2 lines
main.py22 chars2 lines
main.py392 chars13 lines
main.py212 chars7 lines
main.py41 chars3 lines
Open the web browser and go to http://localhost:5000/multiply
Enter the two numbers into the form and click on the "Multiply" button.
The result should be displayed on the page.
Here is the complete code:
main.py704 chars27 lines
I hope this helps you!
gistlibby LogSnag