Question 1: Pythagoras Theorem

Write a Python function pythagoras(a, b) which accepts the two sides of a right angle triangle(a, b) and compute the length of the hypotenuse, c.

Function Input Argument(s):

There will be two inputs.

  1. a (float)

  2. b (float)

Function Return Value:

The function should return a single float representing the length of the hypotenuse of a right angle triangle.

EXAMPLE 1

INPUT:

(3, 4)

OUTPUT:

5