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


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


#28-dars masalalari
#1. Darvozaning eni 4 metr, bo‘yi esa 3 metr:
#1) darvoza yuzasi (S)ni hisoblash dasturini tuzing;
#2) darvoza qirrasining uzunligi (P)ni hisoblash dasturini tuzing. e=4#m
b=3#m #1)
S=e*b

print('S=',S,'mert kadrat') #2)
P=2*(e+b) print('P=',P,'metr')

#2.Ikkita qayiq turg‘un suvda bir-biriga tomon 4 km/soat va
#2 km/soat tezlik bilan suzmoqda. Ular orasidagi masofa 24 km bo‘lsa: #1) ular qancha vaqtdan keyin uchrashadi?
#2) qancha vaqtdan keyin ular orasidagi masofa 12 km ni tashkil etadi? v1=4 #km/soat
v2=2 #km/soat S=24 #km
v=v1+v2
#1) S=v*t. t=S/v. v=v1+v2

t=S/v
print('t=',t,' soat') #2) S1=24-12=12 km S1=12 #km
t1=S1/v print('t1=',t1,'soat')
#3.Doiraning radiusi 4 metrga teng (PI=3.14): #1)doira yuzini hisoblang;
#2)aylana uzunligini hisoblang. #1)
pi=3.14 #s=pi*r*r r=4 #metr s=pi*r*r
print('s=',s,'metr kvadrat') #2) l=2*pi*r
l=2*pi*r print('l=',l,'metr')
# 30 dars masalalari
#1.Darvozaning eni va bo‘yi foydalanuvchi tomonidan kiritiladi #1)darvoza yuzasini hisoblash dasturini tuzing;
#2)darvoza qirrasining uzunligini hisoblash dasturini tuzing.
a=int(input('Bo`yi = ')) b=int(input('Eni= ')) #1)
#S=a*b #print('S=',S)

#2)
P=2*(a+b) print('P=',P)

#2.Quyidagi o‘zgaruvchilar turini aniqlang: #alfa = 8764; beta = ‘Lola’ son=30.2
#alfa=8764 #print(type(alfa))
#beta='Lola' #print(type(beta))
son=39.2 print(type(son))

#3. O‘zgaruvchi uchun qiymat kiritilganda, uning turini #aniqlovchi dastur tuzing.
a=input('a=') print(type(a))

#31-dars mashqlari
#1.Quyidagi o‘zgaruvchilar turini aniqlang: #alfa = 579413; beta = 'Aqlbek'; d = True; #s = 0; resp = ’d’; b = 100; max = False;
#fc = ’True34’; t = 102.5; res = ’2500’; #a = ’-50’; b = 45.67
alfa=579413 #3print(type(alfa)) #x=input() #beta='Aqlbek' #print(type(beta)) #x=input() #d=True #print(type(d)) #x=input() #t=102.5
#print(type(t))
#2.Ikkita qayiq turg‘un suvda bir-biriga #tomon a km/soat va b km/soat tezlik bilan #suzmoqda. Ular orasidagi masofa S km bo‘lsa, #ular qancha vaqtda uchrashadi? a va b #foydalanuvchi tomonidan kiritiladi.
#v1=int(input('birinchi qayiqning tezligi=')) #v2=int(input('ikkinchi qayiqning tezligi=')) #S=int(input('Oralaridagi masofa=')) #v=v1+v2
#S=v*t. t=S/v. v=v1+v2 #t=S/v
#print('t=',t,' soat')
#3.Xonaning bo‘yi (x) va eni (y) metr #foydalanuvchi tomonidan kiritiladi. #Xonaning yuzasi (S) va perimetri
#(P)ni topish dasturini tuzing.
#a=int(input('a='))
#b=int(input('b='))
#1)
#S=a*b

#print('S=',S,'mert kadrat') #x=input()
#2) #P=2*(a+b)
#print('P=',P,'metr')
#6.Doiraning radiusi r ga teng. #Doiraning yuzi (s) va aylana uzunligi
# l ni topish dasturini tuzing. Doiraning #radiusi foydalanuvchi tomonidan kiritiladi #(PI=3.14).

#1)pi=3.14 #s=pi*r*r pi=3.14
r=int(input('r=')) s=pi*r*r
print('s=',s,'metr kvadrat')
#2) l=2*pi*r x=input() l=2*pi*r print('l=',l,'metr')
#1.Berilgan a va b sonlari yig‘indisi, ko‘paytmasini #toping. Yig‘indi va ko‘paytma oxirgi raqamlarining #ko‘paytmasini topish dasturini tuzing.
#33-dars masalalari
#Berilgan Ifoda Natija
# a = 8 d = a + b = 8 + 9 =17 S=7*2=14
# b = 9 c = a * b = 8 * 9 = 72 #a=8
#b=9

#d=a+b #print("d=",d) #c=a*b #print("c=",c) #x=d%10
#print(x) #y=c%10
#print(y) #S=x*y
#print("S=",S)

#2.Berilgan ikki xonali son xonalarining yig‘indisini #hisoblash dasturini tuzing.
#print("ikki xonali son kiriting") #x=int(input())
#a=x//10 #b=x%10
#S=a+b #print("S=",S)
#3.Quyidagi ifodani Python tilida yozing: #1)x + 2y + 52 * 4–58
x+2*y+(5**2)*4-58 #2)256+(2589–1549)*458+45614–4565/5 256+(2589-1549)*458+456**14-4565/5

#35-dars masalalari
#1.Hovuzning bo‘yi 6 metr, eni 4 metr va #chuqurligi 3 metr. Berilganlar asosida #quyidagi topshiriqlar uchun dastur tuzing: #a)Hovuz ichiga kafel qoplash uchun qancha #kvadrat metr kafel kerak bo‘ladi?
#b)Hovuzni to‘ldirish uchun qancha litr suv #kerak bo‘ladi (1 l = 1000 cm3)?
#a=6#metr #b=4#metr #c=3#metr #s=a*b+2*b*c+2*a*c
#print("Kafel qoplash uchun",s,"kvadrat metr maydon") #v=a*b*c
#print("v=",v*1000,"litr")
#2.Yuqoridagi masalada hovuz bo‘yi, eni va #chuqurligi kattaliklari foydalanuvchi #tomonidan kiritiladigan hol uchun #dastur tuzing.
#print("Hovuzning bo`yi a") #a=int(input()) #print("hovuzning eni b") #b=int(input())
#print("Hovuzning chuqurligi") #c=int(input()) #s=a*b+2*b*c+2*a*c
#print("Kafel bosiladigan yuza",s,"metr kvadrat") #v=a*b*c
#print("Hovuzning hajmi",v*1000,"litr")
#3.10 288 sekundni soat, minut va #sekundlarda ifodalang.
#t=10288 #sekund #tm=t/60#minut #ts=tm/60#soat
#print("t=",t,"sek=",tm,"min=",ts,"soat")
#4.Berilgan ikki xonali son xonalarining #ko‘paytmasini hisoblash dasturini tuzing.

#a=int(input('a=')) #b=a//10 #c=a%10
#kupaytma=b*c #print("kupaytma",kupaytma)
#5.Berilgan uch xonali son xonalarining #yig‘indisi va ko‘paytmasini hisoblash #dasturini tuzing.
#Berilgan Ifoda Natija
# 897 8+9+7 24
# 8*9*7 504

print("Uch xonali son kiriting") a=int(input())
print(a) br=a//100
print("birinchi raqam-",br) iir=a//10
ir=iir%10
print("ikkinchi raqam",ir) ur=a%10
print("uchinchi raqam",ur) s=br+ir+ur
p=br*ir*ur
print("Raqamlar yig`indisi-",s) print("Raqamlar ko``paytmasi-",p)
#6.Qisqartirilgan amallarni qo‘llagan holda, #quyidagi dastur natijasini chiqaring.
#Berilgan Ifoda Natija

#

a=8

a=int(input())


#

b=5

b=int(input())


#

c=9

c=int(input())


#



a-=b

#



a*=c

#



a+=(b*c+b)


#



print(a)

print('Butun a ni kiriting') a=int(input()) print('Butun b ni kiriting') b=int(input()) print('Butun c ni kiriting') c=int(input())
a-=b print(a) a*=c
print(a) a+=(b*c+b)
#7. Quyidagi ifodani Python tilida yozing: # y= 7
# x2+x+1+x2 #y=7/(x*x+x+1)+x*x

#37.1-topshiriq


#1. “GULTOJIXO‘ROZ” so‘zidan qism so‘zlar #ajratuvchi dastur tuzing. a='GULTOJIXO`ROZ'
b=a[:3]

print(b) c=a[3:7]
print(c) d=a[7:13]
print(d) input()
#37.2-topshiriq
#2.TUZAMAN, PYTHON, DASTUR, TILIDA, MEN.
#Ushbu so‘zlardan jumla tuzuvchi dastur tuzing. A='TUZAMAN'
B='PYTHON ' C='DASTUR ' D='TILIDA ' E='MEN ' P=E+B+D+C+A
print(P) input()
#37.3-topshiriq
#3.Foydalanuvchi tomonidan kiritilgan matn #uzunligini aniqlovchi dastur tuzing.

print('Matn kiriting') a=str(input())
print("siz kritgan matnda ",len(a),'ta belgi bor.') input()
#37.4-topshiriq
#“*” lar yordamida uchburchak yasang.
print(' * ')
print(' * * ')
print(' * * * ')
print('* * * *')

input()
#37.5-topshiriq
#“+”yordamida kvadrat yasang. print('+ '*4)
print('+ '*4)
print('+ '*4)
print('+ '*4) input()

#37.6-topshiriq
#Belgilar yordamida pingvin yasang. print(" ~ ")
print(" - - ")
print(" (o o) ") print(" / V \ ") print(" /(_)\ ") print(" ^^ ^^ ")

#38-dars 1-uy vazifasi
#1.Kutubxonaga ikkita kitob do‘konidan kitoblar keltirildi.
#Birinchi do‘kondan n dona kitob keltirildi. Ikkinchi do‘kondan esa #birinchi do‘konga qaraganda k dona ko‘p kitob keltirildi. #Kutubxonaga jami qancha kitob keltirildi? Masalani yechish #dasturini tuzing. n va k kattaliklar foydalanuvchi tomonidan kiritiladi.
print('Birinchi do`kondan keltirilgan kitoblar soni n ni kiriting/') n=int(input())
print('Ikinchi do`kondan keltirilgan ortiqcha kitoblar soni k ni liriting/') k=int(input())
J=n+n+k
print('Jami kitoblar soni ',J,'ta') input()

#38-dars 2-uy vazifasi
#2.Komilaga 854*89657*4587*425 amalini dasturga kiritib, #hisoblash topshirig‘i berildi. U qanday dastur tuzishi lozim?

s=854*89657*4587*425
print('s=',s)
#9-sinf IAT 41.1
#1. Tomoni a ga teng kvadrat ichiga doira chizilgan. #Bo‘yalgan soha yuzi s ni topish dasturini tuzing. from math import*
PI=3.14
print('kvadrat tomoni uzunligini kiriting') a=float(input())
skv=pow(a,2) sd=PI*pow((a/2),2) s=skv-sd
print(s) input()
#9-sinf IAT 41.2
#2.Foydalanuvchi tomonidan kiritilgan sondan avval va #keyin keluvchi sonni ekranga chiqaruvchi dastur tuzing. print('a butun son kiriting')
a=int(input()) b=a-1
c=a+1 print(b,':',c) input()
#9-sinf IAT 41.3
#3.n nafar o‘quvchi k dona olma terdi va olmalar ular #o‘rtasida teng taqsimlandi. Qoldiq olmalar savatchaga solindi. #a)Har bir o‘quvchi qanchadan olma olgan?
#b)Savatchaga qancha olma solingan?
#n va k kattaliklar foydalanuvchi tomonidan kiritiladigan #hol uchun dastur tuzing.
print('n ni kiriting') n=int(input()) print('k ni kiriting') k=int(input()) t=n//k
q=n%k print(t,q)
input()
#9-sinf IAT 41.4
#4.Foydalanuvchi tomonidan kiritilgan ikki xonalidan katta #natural sonning oxirgi ikki raqamini topish dasturini tuzing. print('99< a son kiriting')
a=int(input()) q=a%100
print(q) input()
#9-sinf IAT 41.5
#5.Avtobus bir kunda n kilometr yo‘l yuradi. m kilometr #masofani bosib o‘tishi uchun avtobus necha kun yurishi #kerak? n va m kattaliklar foydalanuvchi tomonidan kiritiladi. #Masalani yechish dasturini tuzing.
print('n ni kiriting') n=int(input()) print('m ni kiriting') m=int(input()) kun=m//n print(kun)
#6.Chumolining bosib o‘tgan yo‘li millimetrlarda berilgan. #Uni metr, santimetr va millimetrlarda ifodalang #(masalan, 45 786 = 45 metr 78 cm 6 mm).
input() m=45786
mm=m%10 sm1=m%1000 sm=sm1//10 me=m//1000
print(me,'metr',sm,'sm',mm,'mm') input()
#9-sinf IAT 41.7
#7.Kubning tomoni a ga teng. Kubning hajmini #topish dasturini tuzing.
print("kub qirrasi uzunligi a ni kiriting") a=float(input())
V=a**3 print(V) input()

#9-sinf IAT 41.8
#8.a, b, c, d sonlari berilgan. Ularning o‘rta arifmetigini #topish dasturini tuzing.
print(' to`rtta son kiriting') a=input().split() a1=float(a[0]) a2=float(a[1]) a3=float(a[2]) a4=float(a[3]) ar=float((a1+a2+a3+a4))/4
print(ar) input()
#9-sinf IAT 41.
#5-masalaga qarang

42-DARS
#1.Quyidagi mantiqiy ifodalar natijasini yozing: print((3 > 5) and (2 > 4))
input()
print((2 < 5) and (3 > 0)) input()
print((4 > 2) or (4 < 1)) input()
print((3 > 1) or (5 > 0)) input()

#2.Quyidagi mantiqiy ifodalar natijasini toping: #a)
a = 20
b = 28
print(a>17 and b==28) input()
#b)
a = 20
b = 28
c=True

print(a>17 and b>22 and c)
44-DARS

#1.Mantiqiy ifodalar qiymatini aniqlash uchun #dastur tuzing va natijasini oling:
a=8 b=a**3
print(a<="" p="">

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