Darvozaning eni metr, bo‘yi esa metr: #1) darvoza yuzasi (S)ni hisoblash dasturini tuzing


Download 40.09 Kb.
bet4/10
Sana30.04.2023
Hajmi40.09 Kb.
#1408293
1   2   3   4   5   6   7   8   9   10
Bog'liq
9-sinf inf

man+=1 if c>0:
mus+=1 if c==0:
man==man if c<0:
man+=1 print('mus=',mus,'man=',man)
input()
#48-dars 3-mashq

#3.Ikkita a va b son berilgan. Dastlab kattasini, keyin #esa kichigini chiqaruvchi dastur tuzing.
a=int(input('a='))

b=int(input('b=')) if a>b:
print(a,b) else:
print(b,a) input()
#48-dars 4-mashq
#4.Uchta a, b va c butun son berilgan. Ulardan faqat #musbatlari kvadratini hisoblab chiquvchi dastur tuzing.
a=int(input('a='))

b=int(input('b='))
c=int(input('c=')) if a<=0:
a=0 else:
a=a*a if b<=0:
b=0 else:
b=b*b if c<=0:
c=0 else:
c=c*c s=a+b+c print(a,b,c) input()
#48-dars 5-mashq

#5.Kvadrat tenglamani yechish dasturini tuzing. a=int(input('a='))
b=int(input('b='))
c=int(input('c='))
D=b*b-4*a*c
from math import* if D>=0:
x1=(-b-sqrt(D))/(2*a)
x2=(-b+sqrt(D))/(2*a)

print('x1=',x1,'x2=',x2) else:

print('yechimga ega emas') input()

#48-dars 6-mashq

#6.Hafta raqami 1–7 oraliqda kiritilganda, hafta kunini #ekranga chiqaruvchi dastur tuzing.

a=int(input('Xaftaning nechanch kuni')) if a==1:

print('Dushanba') if a==2:
print('Seshanba') if a==3:
print('Chorshanba') if a==4:
print('Payshanba') if a==5:
print('Juma') if a==6:
print('Shanba') if a==1:
print('Yakshanba')

if a<1 or a>7: print('Bunday kun yo`q')

input()

#48-dars 7-mashq

#7.a va b sonlar berilgan. Agar ular musbat va yig‘indisi #100 dan katta bo‘lsa, a sonining b songa nisbatini, ular #musbat va yig‘indisi 100 dan katta bo‘lmasa, a ning b ga #ko‘paytmasini hisoblash dasturini tuzing.

Download 40.09 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   10




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling