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:
Do'stlaringiz bilan baham: |