3 17-18 guruh talabasi: Solijonov Asadbek
1-topshiriq
T ekshirish uchun Pythondagi
KODI
# Matematik kutubxonani chaqirib olamiz.
from math import *
print("Misolning berilishi quyidagi holatda.")
print("1300/(1700-5∙a^2 ) agar a=20 bo'lsa.")
print("(4∙a^3-1550)/∛(2300+5∙a) agar a≠20 bo'lsa.")
while(True):
a = input("a=")
#Agar a==20 bo’lsa ("1300/(1700-5∙a^2 ) shu misolni hissoblaydi.
if float(a)==20:
c = 1300/(1700-5*pow(float(a), 2))
print("1300/(1700-5∙{}^2)={}".format(a, c))
#Agar a!=20 bo’lsa (4∙a^3-1550)/∛(2300+5∙a) shu misolni hissoblaydi.
else:
c=(4*pow(float(a), 3)-1550)/pow(2300+5*float(a), 1/3)
print("(4∙{}^3-1550) /∛(2300+5∙{})={}".format(a,a,c))
Blok sxemasi
Boshlash
Tugatish
a
a==20
C=1300/(1700-5∙a^2 )
C= (4∙a^3-1550)/∛(2300+5∙a)
C
C
Do'stlaringiz bilan baham: |