O’ZBEKISTON RESPUBLIKASI RAQAMLI
TEXNOLOGIYALARI VAZIRLIGI
TOSHKENT AXBOROT TEXNOLOGIYALARI
UNIVERSITETI
Mustaqil ish - 1
Guruh: LIA001
Bajardi: Abdullayev R
Tekshirdi: Baxramov S
Toshkent-2025
1 – mustaqil ish
DASTUR KODI PYTHON
# Uchta tenglama uchun koeffitsientlar (namuna sifatida)
# 2x + 3y - z = 7
# x - y + 2z = 4
# 3x + 2y + z = 10
a1, b1, c1, d1 = 2, 3, -1, 7 a2,
b2, c2, d2 = 1, -1, 2, 4 a3,
b3, c3, d3 = 3, 2, 1, 10
D = a1*(b2*c3 - b3*c2) - b1*(a2*c3 - a3*c2) + c1*(a2*b3 - a3*b2)
if D == 0:
print("Tizimning yagona yechimi yo'q (D = 0)")
else:
Dx = d1*(b2*c3 - b3*c2) - b1*(d2*c3 - d3*c2) + c1*(d2*b3 - d3*b2)
Dy = a1*(d2*c3 - d3*c2) - d1*(a2*c3 - a3*c2) + c1*(a2*d3 - a3*d2)
Dz = a1*(b2*d3 - b3*d2) - b1*(a2*d3 - a3*d2) + d1*(a2*b3 - a3*b2)
x = Dx / D
y = Dy / D
z = Dz / D
print("Natijalar:")
print("x
=
",
x)
print("y
=
",
y)
print("z =", z)
NATIJA
PS C:\Users\user\Desktop> c:; cd 'c:\Users\user\Desktop'; &
'c:\Users\user\AppData\Local\Programs\Python\Python313\python.exe'
'c:\Users\user\.vscode\extensions\ms-python.debugpy-2025.14.1win32x64\bundled\libs\debugpy\launcher' '52354' '--' 'c:\Users\user\Desktop\python77.py'
Tizimning yagona yechimi yo'q (D = 0)
PS C:\Users\user\Desktop>