From fccc436e23af53997c62475469920ef2f59ff62a Mon Sep 17 00:00:00 2001 From: Joseph Mawa <52580190+nibble0101@users.noreply.github.com> Date: Tue, 25 Aug 2020 18:37:10 +0300 Subject: [PATCH] Fixed test description for Rosetta Code: Euler method challenge. (#39452) * Update greatest-subsequential-sum.english.md Added missing closing bracket in test description in the tests section. Removed variable declared twice in the solution section. * Update euler-method.english.md * Update euler-method.english.md * Update euler-method.english.md Added parameter description fixing the suggested changes. * Update euler-method.english.md Removed some formatting from the added text. * Update euler-method.english.md Moved seed function parameter description to instructions section. --- .../rosetta-code/euler-method.english.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/curriculum/challenges/english/10-coding-interview-prep/rosetta-code/euler-method.english.md b/curriculum/challenges/english/10-coding-interview-prep/rosetta-code/euler-method.english.md index 5775be43d6..36e7347e2c 100644 --- a/curriculum/challenges/english/10-coding-interview-prep/rosetta-code/euler-method.english.md +++ b/curriculum/challenges/english/10-coding-interview-prep/rosetta-code/euler-method.english.md @@ -52,13 +52,13 @@ The analytical solution, which we will compare to the numerical approximation, i ## Instructions
-Implement a routine of Euler's method and then to use it to solve the given example of Newton's cooling law with it for three different step sizes of: +Implement a routine of Euler's method and then use it to solve the given example of Newton's cooling law for three different step sizes of: -and to compare with the analytical solution. +and compare with the analytical solution. Initial values: +First parameter to the function is initial time, second parameter is initial temperature, third parameter is elapsed time and fourth parameter is step size.
+ + ## Tests
@@ -75,11 +78,11 @@ and to compare with the analytical solution. tests: - text: eulersMethod should be a function. testString: assert(typeof eulersMethod === 'function'); - - text: eulersMethod(0, 100, 100, 10) should return a number. - testString: assert(typeof eulersMethod(0, 100, 100, 10) === 'number'); - - text: eulersMethod(0, 100, 100, 10) should return 20.0424631833732. + - text: eulersMethod(0, 100, 100, 2) should return a number. + testString: assert(typeof eulersMethod(0, 100, 100, 2) === 'number'); + - text: eulersMethod(0, 100, 100, 2) should return 20.0424631833732. testString: assert.equal(eulersMethod(0, 100, 100, 2), 20.0424631833732); - - text: eulersMethod(0, 100, 100, 10) should return 20.01449963666907. + - text: eulersMethod(0, 100, 100, 5) should return 20.01449963666907. testString: assert.equal(eulersMethod(0, 100, 100, 5), 20.01449963666907); - text: eulersMethod(0, 100, 100, 10) should return 20.000472392. testString: assert.equal(eulersMethod(0, 100, 100, 10), 20.000472392);