Challenge 43

📐

Pythagorean Theorem

Open in Code Editor or Copy Instructions
...solutions at bottom of page...

Create a function to calculate the value of c in the Pythagorean Theorem

Examples:

pythag(4, 5) returns 6

pythag(1, 1) would return 1.41

Extension:

Pythagorean triplets are 3 numbers (a, b, c) that satisfy the Pythagorean equation, where all are integers - the 4,5,6 example above is one set of such triplets

Solutions

IGCSE 0478 / O-Level 2210 A-Level 9618