Create a simple web-based calculator using Flask.
After completing this assignment, you should understand:
- The very basics of making a web application
After completing this assignment, you should be able to:
- Create a Flask app
- A Git repo called web-calculator containing at least:
README.md
file explaining how to run your project- a
requirements.txt
file - a suite of tests for your project
- Passing unit tests
- No PEP8 or Pyflakes warnings or errors
Create a simple web application that works as a calculator. The first page, which you get via a GET request, should have a form with two text boxes, a dropdown box for the operation (+, -, *, /) and a button to calculate.
The form uses POST to go to a second screen which shows the results of your calculation.
In addition to the requirements from Normal Mode:
-
The form should also appear on the second page -- the calculation results page. The first operand should be filled in with the results of the previous calculation.
-
Add Foundation or Bootstrap to your application to make it look nicer.