2023-06-25 Python - math.hypot(*coordinates):ユークリッドノルム(原点→座標のベクトルの長さ) Python3 mathモジュール 概要 インポート 実行結果 表示イメージ 概要hypot(*coordinates) ユークリッドノルム(原点→座標のベクトルの長さ) mathモジュール インポート import math 実行結果 import math print(math.hypot(2)) print(math.hypot(2,2)) print(math.hypot(2,2,2)) 表示イメージ 2.0 2.8284271247461903 3.4641016151377544