freeCodeCamp/curriculum/challenges/arabic/08-coding-interview-prep/rosetta-code/euler-method.arabic.md

1.2 KiB

title id challengeType videoUrl localeTitle
Euler method 59880443fb36441083c6c20e 5

Description

undefined

Instructions

undefined

Tests

tests:
  - text: ''
    testString: 'assert(typeof eulersMethod === "function", "<code>eulersMethod</code> is a function.");'
  - text: ''
    testString: 'assert(typeof eulersMethod(0, 100, 100, 10) === "number", "<code>eulersMethod(0, 100, 100, 10)</code> should return a number.");'
  - text: ''
    testString: 'assert.equal(eulersMethod(0, 100, 100, 2), 20.0424631833732, "<code>eulersMethod(0, 100, 100, 10)</code> should return 20.0424631833732.");'
  - text: ''
    testString: 'assert.equal(eulersMethod(0, 100, 100, 5), 20.01449963666907, "<code>eulersMethod(0, 100, 100, 10)</code> should return 20.01449963666907.");'
  - text: ''
    testString: 'assert.equal(eulersMethod(0, 100, 100, 10), 20.000472392, "<code>eulersMethod(0, 100, 100, 10)</code> should return 20.000472392.");'

Challenge Seed

function eulersMethod (x1, y1, x2, h) {
  // Good luck!
}

Solution

// solution required