Compute the Hypotenuse
We have a table right_triangles
where each row contains the legs of a triangle (side_a
and side_b
).
right_triangles
column_name | type |
---|---|
id | INTEGER |
side_a | INTEGER |
side_b | INTEGER |
For this challenge, select the 2 legs, side_a
and side_b
, and also compute the hypotenuse
.
Use a computed column and the Pythagorean Theorem to compute the hypotenuse.
Make sure to alias that computation as hypotenuse
.
I encourage you to take a look at the "Expected" tab to see the exact answer we're looking for.
See if you can figure out which operators/functions you'll need in the documentation or by searching Google.