From 76e1b1a4badce7004d907897f93a28ee460e9948 Mon Sep 17 00:00:00 2001 From: Kaitlin Date: Thu, 19 Sep 2019 09:51:10 +0100 Subject: [PATCH] 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 --- .../build-a-javascript-calculator.english.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curriculum/challenges/english/03-front-end-libraries/front-end-libraries-projects/build-a-javascript-calculator.english.md b/curriculum/challenges/english/03-front-end-libraries/front-end-libraries-projects/build-a-javascript-calculator.english.md index f81ed0607e..93939a0ee5 100644 --- a/curriculum/challenges/english/03-front-end-libraries/front-end-libraries-projects/build-a-javascript-calculator.english.md +++ b/curriculum/challenges/english/03-front-end-libraries/front-end-libraries-projects/build-a-javascript-calculator.english.md @@ -23,7 +23,7 @@ You can use any mix of HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux, and 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 #13: If 2 or more operators are entered consecutively, the operation performed should be the last operator entered (excluding the negative (-) sign). For example, if 5 + * 7 = is entered, the result should be 35 (i.e. 5 * 7); if 5 * - 5 = is entered, the result should be -25 (i.e. 5 x (-5)). 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). Note On Calculator Logic: It should be noted that there are two main schools of thought on calculator input logic: immediate execution logic and formula logic. 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.