Notebooks · posts/solve-the-quadratic
Solve the quadratic
A ball is thrown straight up at 4 m/s from 1 m above the ground. When does it land? Write roots(a, b, c), the two solutions of , smaller first.
A ball is thrown straight up at 4 m/s from 1 m above the ground. With rounded to 10 m/s², its height after seconds is
It lands when , that is, when .
Write roots(a, b, c), the two solutions of , smaller first. You may assume . The tests use the ball and a rectangle with a perimeter of 10 and an area of 6, whose sides and satisfy .
Look inside this program
- Atlas
The program’s map: every function and which calls which.
There’s no recorded run of this program yet.
This is a problem: its tests fail until the functions in it are written. Edit a cell and run it to try; the cells below it show whether the tests pass.
Shift+Enter in a cell runs it and moves to the next. Running a cell runs every cell above it too, as one program.