A responsive web calculator built with Flask, vanilla JavaScript, HTML, and CSS. It supports arithmetic sequences, percentages, exponent syntax, keyboard input, and safe server-side expression evaluation.
Responsive Flask calculator with safe arithmetic evaluation, keyboard support, and a modern dark interface.
calculator flask python javascript html css responsive-design web-app arithmetic
- Responsive layout for mobile, tablet, and desktop screens
- Dark charcoal interface with an orange equals button
- Addition, subtraction, multiplication, division, percentages, and exponents
- Keyboard support, clear, delete, and expression sequences
- Safe AST-based evaluation without Python
eval() - Division-by-zero and invalid-expression handling
.
|-- app.py
|-- templates/
| `-- index.html
|-- static/
| |-- app.js
| `-- styles.css
`-- LICENSE
-
Create or activate a Python virtual environment.
.\calculator\Scripts\Activate.ps1
-
Install Flask if needed.
pip install Flask
-
Start the application.
python app.py
-
Open http://127.0.0.1:5000 in a browser.
This project is free to use, fork, modify, and redistribute under the MIT License. Bug reports, feature requests, and other issues are welcome through GitHub Issues. Pull requests are welcome as well.
Distributed under the MIT License. See LICENSE for details.