Skip to content

Satyam-nitp/01_Project_Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calculator Application

This project is a simple web-based calculator built using HTML, CSS, JavaScript, and Python (Flask). The calculator performs basic arithmetic operations such as addition, subtraction, multiplication, and division.

Project Structure

├── app.py                 # The Python (Flask) backend file that processes calculations
├── requirements.txt       # The file listing project dependencies
├── templates/
│   └── index.html         # The HTML file for the calculator's user interface
├── static/
│   ├── style.css         # The CSS file for styling the calculator
│   └── app.js             # The JavaScript file for handling client-side logic
├── README.md              # This README file

Features

  • Basic arithmetic operations: Addition, Subtraction, Multiplication, and Division.
  • User-friendly interface with buttons for number input and operations.
  • Responsive design using CSS to fit different screen sizes.
  • Backend calculations handled by Python (Flask).

Technology Stack

  • HTML: Defines the structure of the calculator's interface.
  • CSS: Styles the calculator to look modern and user-friendly.
  • JavaScript: Handles client-side logic, including button clicks and display updates.
  • Python (Flask): Manages backend processing and serves the web application.

Setup Instructions

1. Clone the Repository

git clone https://github.com/your-username/calculator-app.git
cd calculator-app

2. Install Dependencies

Install the Python dependencies listed in requirements.txt:

pip install -r requirements.txt

3. Run the Flask Application

Run the Flask app (app.py) locally:

python app.py

4. Access the Calculator

Open your browser and navigate to http://localhost:5000 to use the calculator.

File Descriptions

  • app.py: This Python file is the main backend, using Flask to process calculation requests from the frontend and return the results.
  • templates/index.html: This file contains the structure of the calculator, including buttons for numbers and operations.
  • static/style.css: This file provides the styling for the calculator, making it visually appealing and responsive.
  • static/app.js: This JavaScript file manages the logic for handling user interactions such as button clicks, updating the display, and performing calculations on the client side.

How to Use the Calculator

  1. Enter numbers using the buttons or your keyboard.
  2. Select the operation (addition, subtraction, etc.).
  3. Press the equal button (=) to see the result.

Future Improvements

  • Add support for advanced mathematical functions (square root, exponentiation, etc.).
  • Implement a history feature to track previous calculations.
  • Add unit tests for the Python backend.

Acknowledgements

  • The design is inspired by classic calculator interfaces.

About

This is the code for making a calculator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published