Update user test 13 desc to match changed test (#36523)
* Update user test 13 desc to match changed test Refer https://github.com/freeCodeCamp/testable-projects-fcc/issues/933. * Add examples to illustrate change to user story 13
This commit is contained in:
committed by
Kristofer Koishigawa
parent
5d92b3c668
commit
76e1b1a4ba
@ -23,7 +23,7 @@ You can use any mix of HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux, and
|
||||
<strong>User Story #10:</strong> When inputting numbers, my calculator should not allow a number to begin with multiple zeros.
|
||||
<strong>User Story #11:</strong> When the decimal element is clicked, a <code>.</code> should append to the currently displayed value; two <code>.</code> in one number should not be accepted.
|
||||
<strong>User Story #12:</strong> I should be able to perform any operation (+, -, *, /) on numbers containing decimal points.
|
||||
<strong>User Story #13:</strong> If 2 or more operators are entered consecutively, the operation performed should be the last operator entered.
|
||||
<strong>User Story #13:</strong> If 2 or more operators are entered consecutively, the operation performed should be the last operator entered (excluding the negative (-) sign). For example, if <code>5 + * 7 =</code> is entered, the result should be <code>35</code> (i.e. 5 * 7); if <code>5 * - 5 =</code> is entered, the result should be <code>-25</code> (i.e. 5 x (-5)).
|
||||
<strong>User Story #14:</strong> Pressing an operator immediately following <code>=</code> should start a new calculation that operates on the result of the previous evaluation.
|
||||
<strong>User Story #15:</strong> 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 <code>2 / 7</code> with reasonable precision to at least 4 decimal places).
|
||||
<strong>Note On Calculator Logic:</strong> It should be noted that there are two main schools of thought on calculator input logic: <dfn>immediate execution logic</dfn> and <dfn>formula logic</dfn>. Our example utilizes formula logic and observes order of operation precedence, immediate execution does not. Either is acceptable, but please note that depending on which you choose, your calculator may yield different results than ours for certain equations (see below example). As long as your math can be verified by another production calculator, please do not consider this a bug.
|
||||
|
Reference in New Issue
Block a user