05:00

Ikki Nuqta O'rtasidagi Masofa

Koordinatalari (x₁,y₁) va (x₂,y₂) bo'lgan nuqtalar orasidagi masofani hisoblang!

Ikki Nuqta O'rtasidagi Masofa Formulasi
d = √[(x₂ - x₁)² + (y₂ - y₁)²]
import math
x1 = float(input('x1 nuqta: '))
x2 = float(input('x2 nuqta: '))
y1 = float(input('y1 nuqta: '))
y2 = float(input('y2 nuqta: '))
s = math.sqrt(____?____)
print('Ikki nuqta orasidagi masofa =', s)
  
math.pow((x2-x1),2) + math.pow((y2-y1),2)
(x2-x1)**2 + (y2-y1)**2
math.pow((x1-x2),2) + math.pow((y1-y2),2)
(x2+x1)**2 + (y2+y1)**2
math.pow(x2-x1,2) + math.pow(y2-y1,2)
(x2-x1) + (y2-y1)
math.sqrt((x2-x1)**2 + (y2-y1)**2)
(x2-x1)*(y2-y1)