|
| 1 | +# Calculator Project Readme |
| 2 | + |
| 3 | +This project is a simple calculator implemented using HTML, CSS, and JavaScript. It allows users to perform basic arithmetic operations, view computation history, and clear the history. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +### Calculator Operations |
| 8 | + |
| 9 | +- Addition (`+`) |
| 10 | +- Subtraction (`-`) |
| 11 | +- Multiplication (`*`) |
| 12 | +- Division (`÷`) |
| 13 | +- Percentage (`%`) |
| 14 | +- Toggle Sign (`+/-`) |
| 15 | +- Clear All (`AC`) |
| 16 | +- Delete Last Entry (`DE`) |
| 17 | +- Decimal Point (`.`) |
| 18 | + |
| 19 | +### Computation History |
| 20 | + |
| 21 | +- Users can view a history of their computations. |
| 22 | +- The history is limited to the last 10 entries. |
| 23 | + |
| 24 | +### Clear History |
| 25 | + |
| 26 | +- Users can clear the computation history by clicking the "Clear History" button. |
| 27 | + |
| 28 | +### Toggle History Visibility |
| 29 | + |
| 30 | +- Users can toggle the visibility of the computation history by clicking the "History" button. |
| 31 | + |
| 32 | +## Usage |
| 33 | + |
| 34 | +1. **Performing Calculations** |
| 35 | + |
| 36 | + - Click on the digits (`0-9`) to input numbers. |
| 37 | + - Use the arithmetic operation buttons (`+, -, *, ÷, %`) for calculations. |
| 38 | + - Click the "=" button to see the result on the screen. |
| 39 | + - Use the "AC" button to clear all entries. |
| 40 | + - Use the "DE" button to delete the last entry. |
| 41 | + - Toggle the sign of a number using the "+/-" button. |
| 42 | + - Add decimal points using the "." button. |
| 43 | + |
| 44 | +2. **Viewing Computation History** |
| 45 | + |
| 46 | + - Click on the "history" button to toggle the visibility of the computation history. |
| 47 | + - The history displays the last 10 computation entries. |
| 48 | + |
| 49 | +3. **Clearing History** |
| 50 | + |
| 51 | + - Click on the "Clear History" button to remove all computation history. |
| 52 | + |
| 53 | +## Project Structure |
| 54 | + |
| 55 | +- **HTML (`index.html`):** |
| 56 | + - Defines the structure of the calculator and computation history. |
| 57 | + - Includes necessary elements and classes. |
| 58 | + |
| 59 | +- **CSS (`index.css`):** |
| 60 | + - Styles the calculator and computation history elements. |
| 61 | + - Implements transitions and animations for a smoother user experience. |
| 62 | + |
| 63 | +- **JavaScript (`index.js`):** |
| 64 | + - Defines functionality for the calculator operations. |
| 65 | + - Handles user interactions and updates the screen accordingly. |
| 66 | + - Manages computation history and its visibility. |
| 67 | + |
| 68 | +## Dependencies |
| 69 | + |
| 70 | +- The project has no external dependencies and runs on basic HTML, CSS, and JavaScript. |
| 71 | + |
| 72 | +## Development and Contributions |
| 73 | + |
| 74 | +- This project is open for contributions. |
| 75 | +- Feel free to enhance and extend the functionality. |
| 76 | +- Follow common coding standards and practices. |
| 77 | +- Submit pull requests for review. |
| 78 | + |
0 commit comments