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


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

input()

#47-dars 2-misol

#2. Uch xonali sonda bir xil raqamlar #mavjudligini aniqlovchi dastur tuzing.

print('uch xonali son kriting') a=int(input('a='))

b=a%10 i=b%10 u=i%10
if b==i or i==u or b==u:
print('bir hil raqamlar mavjud') else:
print('bir hil raqamlar mavjud emas') input()
#47-dars 3-misol
#3.a va b sondan qaysi biri juft #ekanligini aniqlovchi dastur tuzing.
a=int(input('a='))

b=int(input('b='))

a1=a%10 a2=b%10

if a1%2==0:
print('a soni juft',a) if a2%2==0:
print('b soni juft',b) input()

#47-dars 4-misol

#4.3 ta butun son kiritildi. Qaysi biri juft #ekanligini aniqlovchi dastur tuzing.

a=int(input('a='))

b=int(input('b='))
c=int(input('c=')) a1=a%10 a2=b%10 a3=c%10
if a1%2==0:
print('a soni juft',a) if a2%2==0:
print('b soni juft',b) if a3%2==0:
print('c soni juft',c)
#48-dars. AMALIY MASHG‘ULOT

#1.Uchta a, b va c butun son berilgan. Ular orasidan #musbatlari sonini topish dasturini tuzing.

#48-dars 1-mashq

a=int(input('a='))
b=int(input('b='))
c=int(input('c=')) s=0
if a>0:
s+=1

if b>0:

s+=1

if c>0:

s+=1

print('musbat sonlar',s,'ta') input()

#48-dars 2-mashq
#2.Uchta a, b va c butun son berilgan. Ular orasidan #musbat va manfiylari sonini topish dasturini tuzing.
a=int(input('a='))
b=int(input('b='))
c=int(input('c=')) mus=0
man=0 if a>0:
mus+=1 if a==0:
man==man if a<0:
man+=1 if b>0:
mus+=1 if b==0:
man==man if b<0:

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