|
|
@ -3,10 +3,12 @@ |
|
|
|
### Instructions |
|
|
|
### Instructions |
|
|
|
|
|
|
|
|
|
|
|
Isaac Newton has forgotten his laws of physics and needs your help to animate an object on his game. |
|
|
|
Isaac Newton has forgotten his laws of physics and needs your help to animate an object on his game. |
|
|
|
He must use the Second Law of Motion that states, when the forces acting on an object are unbalanced, the object will accelerate. |
|
|
|
|
|
|
|
This acceleration is dependent upon the force that act upon the object and the object's mass. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
So he wants to know for an object with : |
|
|
|
He must use the Second Law of Motion that states, "when the forces acting on an object are unbalanced, the object will accelerate." |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This acceleration is dependent upon the force that acts upon the object and the object's mass. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
So he wants to know what the acceleration of that object is, depending on its properties: |
|
|
|
|
|
|
|
|
|
|
|
- mass of xx |
|
|
|
- mass of xx |
|
|
|
- Δv of xx |
|
|
|
- Δv of xx |
|
|
@ -15,9 +17,18 @@ So he wants to know for an object with : |
|
|
|
- distance xx |
|
|
|
- distance xx |
|
|
|
- time xx |
|
|
|
- time xx |
|
|
|
|
|
|
|
|
|
|
|
whats the acceleration of that object. |
|
|
|
Create a function named `getAcceleration` that calculates the velocity of a given object. For example: |
|
|
|
Create a function called `getAcceleration` that given an object with the values of `{ f: 10, m: 5, Δv: 100, Δt: 50, t:1, d: 10 }` |
|
|
|
```js |
|
|
|
it must calculate the acceleration. If its not possible to calculate it you must return the string `impossible` |
|
|
|
{ |
|
|
|
|
|
|
|
f: 10, |
|
|
|
|
|
|
|
m: 5, |
|
|
|
|
|
|
|
Δv: 100, |
|
|
|
|
|
|
|
Δt: 50, |
|
|
|
|
|
|
|
t:1, |
|
|
|
|
|
|
|
d: 10 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
If its not possible to calculate it, it must return the string `"impossible"`. |
|
|
|
|
|
|
|
|
|
|
|
### Formulas |
|
|
|
### Formulas |
|
|
|
|
|
|
|
|
|
|
@ -27,6 +38,7 @@ a = Δv/Δt |
|
|
|
a = 2d/t^2 |
|
|
|
a = 2d/t^2 |
|
|
|
|
|
|
|
|
|
|
|
a = acceleration |
|
|
|
a = acceleration |
|
|
|
|
|
|
|
m = mass |
|
|
|
F = force |
|
|
|
F = force |
|
|
|
Δv = final velocity - initial velocity |
|
|
|
Δv = final velocity - initial velocity |
|
|
|
Δt = final time - initial time |
|
|
|
Δt = final time - initial time |
|
|
@ -36,6 +48,6 @@ t = time |
|
|
|
|
|
|
|
|
|
|
|
### Quote |
|
|
|
### Quote |
|
|
|
|
|
|
|
|
|
|
|
Truth is ever to be found in simplicity, and not in the multiplicity and confusion of things |
|
|
|
_"Truth is ever to be found in simplicity, and not in the multiplicity and confusion of things."_ |
|
|
|
|
|
|
|
|
|
|
|
Isaac Newton |
|
|
|
Isaac Newton |
|
|
|