Ctr

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.

© 2022 Andrew Carlson. All rights reserved.

side_a
INTEGER
side_b
INTEGER
hypotenuse
FLOAT
1
3
4
5
2
6
12
13.416407864998739
3
4
5
6.4031242374328485
4
6
11
12.529964086141668
5
10
1
10.04987562112089
5 rows

You haven't solved this challenge yet!
Are you sure you want to reveal the answer?