# 5.13: Exercise


Before you go on, you might want to work on the following exercise.

##### Exercise 5.1

Write a function called hypotenuse that takes two parameters, a and b, that represent the lengths of two sides of a right triangle. It should assign to res the length of the third side of the triangle, given by the formula

$c = \sqrt{a^2 + b^2}\notag$

This page titled 5.13: Exercise is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Carey Smith via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.