Coder Social home page Coder Social logo

davigl / basic-calculator Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 6.0 1.08 MB

➗ calculator (sum, subtract, multiply, divide)

Home Page: https://eudavi-calculator.netlify.app/

JavaScript 92.41% HTML 7.59%
react calculator-javascript styled-components hooks calculator calculator-app freecodecamp pwa-apps progressive-web-app pwa

basic-calculator's Introduction

React Basic Calculator

GitHub Last Commit GitHub Stars Repository issues GitHub top Language Repository Size

About   |    Stories   |    License


🤔 About

Calculator that allows basic maths operations, visit the project by clicking here. :one: ➕ :one:

https://hasashisama-calculator.netlify.com/

Basic Calculator

🙆‍♀️ User Stories

  • User Story #1: My calculator should contain a clickable element containing an = (equal sign) with a corresponding id="equals".
  • User Story #2: My calculator should contain 10 clickable elements containing one number each from 0-9, with the following corresponding IDs: id="zero", id="one", id="two", id="three", id="four", id="five", id="six", id="seven", id="eight", and id="nine".
  • User Story #3: My calculator should contain 4 clickable elements each containing one of the 4 primary mathematical operators with the following corresponding IDs: id="add", id="subtract", id="multiply", id="divide".
  • User Story #4: My calculator should contain a clickable element containing a . (decimal point) symbol with a corresponding id="decimal".
  • User Story #5: My calculator should contain a clickable element with an id="clear".
  • User Story #6: My calculator should contain an element to display values with a corresponding id="display".
  • User Story #7: At any time, pressing the clear button clears the input and output values, and returns the calculator to its initialized state; 0 should be shown in the element with the id of display.
  • User Story #8: As I input numbers, I should be able to see my input in the element with the id of display.
  • User Story #9: In any order, I should be able to add, subtract, multiply and divide a chain of numbers of any length, and when I hit =, the correct result should be shown in the element with the id of display.
  • User Story #10: When inputting numbers, my calculator should not allow a number to begin with multiple zeros.
  • User Story #11: When the decimal element is clicked, a . should append to the currently displayed value; two . in one number should not be accepted.
  • User Story #12: I should be able to perform any operation (+, -, *, /) on numbers containing decimal points.
  • User Story #13: If 2 or more operators are entered consecutively, the operation performed should be the last operator entered.
  • User Story #14: Pressing an operator immediately following = should start a new calculation that operates on the result of the previous evaluation.
  • User Story #15: My calculator should have several decimal places of precision when it comes to rounding (note that there is no exact standard, but you should be able to handle calculations like 2 / 7 with reasonable precision to at least 4 decimal places).

📝 License

Copyright © 2020, Davi Guimarães.

basic-calculator's People

Contributors

davigl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.