Bài 1
From math import sqrt
x1=(input())
x2=(input())
y1=(input())
y2=(input())
dAB=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))
Print("{:.3}".format(dAB))
Bài 2
From math import sqrt
p=(input())
a=(input())
c=(input())
p=(a+b+c)/2
s=sqrt((a+b+c)/2*(((a+b+c)/2)-a)*(((a+b+c)/2)-b)*(((a+b+c)/2)-c))
Print("{:.3}".format(p))
Print("{:.3}".format(s))
bài 4:
a = int(input())
b = int(input())
y = (a - 2)*(b - 2)
x = a * b - y
print(x)
print(y)
bài 3:
from math import sqrt
from math import pow
def distance_points(ax, ay, bx, by):
return sqrt(pow(bx - ax, 2) + pow(by - ay, 2))
x1 = int(input())
x2 = int(input())
x3 = int(input())
y1 = int(input())
y2 = int(input())
y3 = int(input())
dab = distance_points(x1, y1, x2, y2)
dbc = distance_points(x2, y2, x3, y3)
dac = distance_points(x1, y1, x3, y3)
print("d_AB = {:.3}".format(dab))
print("d_BC = {:.3}".format(dbc))
print("d_AC = {:.3}".format(dac))
bài 1 10/10/2022
m=int(input())
n=int(input())
x=int(input())
y=int(input())
q=(m*m+n)*(x+y)
p=(x**3+y**4)/m+n
print(q)
print ("{:.3}".format(p))