You can download this code by clicking the button below.
This code is now available for download.
Calculate the length of the hypotenuse of a right triangle using the Pythagorean theorem.
Technology Stack : math (mathematical computation)
Code Type : Mathematical calculation
Code Difficulty : Beginner
import math
import os
import random
def calculate_hypotenuse(a, b):
return math.sqrt(a**2 + b**2)