# Calculator Project

A simple calculator application demonstrating basic web development with HTML, CSS, and JavaScript.

## Project Structure

- `calculator.html` - Single-file calculator with embedded CSS and JavaScript

## Features

- Basic arithmetic operations (+, -, ×, ÷)
- Decimal number support
- Clear and backspace functionality
- Division by zero error handling
- Modern gradient UI with purple theme

## Implementation Notes

The calculator uses a state-based approach with:
- `currentInput` - Current number being entered
- `previousInput` - First operand in operation
- `operator` - Current operation selected
- `shouldResetDisplay` - Flag to manage display state

### Key Functions

- `appendNumber(number)` - Adds digits/decimals to current input
- `appendOperator(op)` - Sets operation and stores first operand
- `calculate()` - Performs calculation based on operator
- `clearDisplay()` - Resets all values to initial state
- `deleteLast()` - Removes last character from input

## Future Plans

- Scientific calculator functions (sin, cos, tan, log, sqrt)
- Statistics operations (mean, median, standard deviation)
- Memory functions (M+, M-, MR, MC)
- Calculation history
- Keyboard input support
