Skip to content
本站總訪問量
本站訪客數 人次

TQC+ 程式語言Python 108 座標距離計算

題目說明:請撰寫一程式,讓使用者輸入四個數字x1、y1、x2、y2,分別代表兩個點的座標(x1, y1)、(x2, y2)。計算並輸出這兩點的座標與其歐式距離。

提示1:歐式距離 = (x1x2)2+(y1y2)2

提示2:兩座標的歐式距離,輸出到小數點後第4位 。

範例輸入

shell
2
1
5.5
8

範例輸出

( 2 , 1 )
( 5.5 , 8 )
Distance = 7.8262

Contributors

The avatar of contributor named as lucashsu95 lucashsu95

Changelog