Skip to content

irfanspangodu/CodeAlpha_Basic_Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Basic Calculator

A basic calculator built using HTML, CSS, JavaScript, and Bootstrap.
This project focuses on clean UI, accurate arithmetic operations, accessibility, and responsive design.


Features

  • Basic arithmetic operations
    • Addition (+)
    • Subtraction ()
    • Multiplication (×)
    • Division (÷)
  • Two-way display
    • Top: input expression
    • Bottom: calculated result
  • Premium dark UI
    • Subtle gradients
    • Depth and button feedback
  • Keyboard support
    • Numbers, operators, Enter, Backspace, Escape
  • Accessible
    • ARIA roles and live regions
    • Screen-reader friendly output
  • Responsive design
    • Built using Bootstrap grid and utilities

Technology Stack

  • HTML5 – semantic structure
  • CSS3 – custom styling and premium UI effects
  • JavaScript (Vanilla) – calculator logic and keyboard handling
  • Bootstrap 5 – responsive layout and UI consistency

How It Works

  • The calculator displays user input and results on separate display lines for clarity.
  • Multiplication and division are shown as × and ÷ in the UI, while internally handled safely using JavaScript operators.
  • User interactions work seamlessly via both mouse clicks and keyboard input.
  • Input validation prevents invalid expressions and handles errors gracefully.

How to Run

  1. Download or clone the repository
  2. Open index.html in any modern web browser
    (No build tools or server required)

Design Decisions

  • No external calculation libraries to keep logic simple and transparent.
  • Bootstrap only for layout, not for business logic.
  • Two-way display improves readability compared to single-line calculators.
  • Premium dark theme chosen for better contrast and modern appearance.

Author

Developed as part of an internship task, with emphasis on:

  • Clean code structure
  • Usable UI/UX
  • Accessibility and responsiveness

License

This project is for educational and demonstration purposes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published