Begin23. Uchburchakni uchta tomoni uchlari koorditalari berilgan (x1,y1),(x2,y2),(x3,y3).Ikki nuqta orasidagi masofani topish formulasi ab formula bilan berilgan.Uchburchakning perimetri va yuzasini toping.
x1=3
y1=-2
x2=5
y2=0
x3=3
y3=-6
ab=pow(pow(x2-x1,2)+pow(y2-y1,2),1/2)
bc=pow(pow(x3-x2,2)+pow(y3-y2,2),1/2)
ac=pow(pow(x3-x1,2)+pow(y3-y1,2),1/2)
p=(ab+bc+ac)/2
s=pow(p*(p-ab)*(p-bc)*(p-ac),1/2)
print(s)
Integer21.Kun boshidan boshlab N sekund vaqt o`tdi.Kun boshidan boshlab qancha minut va qancha sekund o`tganligini aniqlovchi programma tuzing.
N=int(input()) #sekundda
min=N//60
sekund=N%60
print('minuti ',min )
print('sekund', sekund)
Do'stlaringiz bilan baham: |