Referati termiz 2023 mavzu: mantiqiy amallar misolni yolg’onlikka tekshirish




Download 14,52 Kb.
Sana25.11.2023
Hajmi14,52 Kb.
#105450
TuriReferat
Bog'liq
dasturlash fanidan misollar Xolmoʻminov Musulmon 1 mustaqil ish

O’zbekiston Respublikasi Oliy ta’lim fan va innovatsiyalar vazirligi.

Termiz Davlat Universiteti
“Amaliy matematika va intellektual texnalogiyalar”
fakulteti
“Kompyuter va dasturiy injiniring” kafedrasi
Dasturiy injiniring 1-bosqich 123-guruh talabasi
Xolmoʻminov Musulmon ning

DASTURLASH fanidan

REFERATI

TERMIZ 2023



MAVZU: MANTIQIY AMALLAR


  1. Misolni yolg’onlikka tekshirish.

a = True
b = False
print(4 == 5)
natija: False
2. Misolni rostlikka tekshirish.
a = 20
c = False
print(not a>17 or not c)
natija: True
3. Ixtiyoriy son va yolg'on atamani berilgan berilgan. Uni rostlikka tekshirish.
b = 10
c = False
print(not b>7 or not c)
natija: True
4.rost va yolg'on tushunchalari berilgan. Ularni rostlikka tekshirish.
a = True
b = False
print(not(a and b) or b )
natija: True
5. Misolni rostlikka ifodalang
a = True
b = False
c = False
print(not(a and c) and (a or b) or c)
natija: True
6. Rostlikka ifodalang.
a = 44
b = 11
c = 4
print((a>b) or (bnatija: True
7.Rostlikka ifodalang
a = 44
b = 11
print((a>b) or b and a)
natija: True
8. Yolg'onlikka ifodalang.
a = 1>3
b = 4<0
print(a or b)
natija: False
9. Yolg'onlikka ifodalang
c = 5 > 3
d = 6 < 8
e = 7 > 10
a = 1 < -2
print((a and d) or (c and e))
natija: False
10. Ifodani yolg'onga o'tiring.
a = 2 == 0
b = 2 != 2
print(a or b)
natija: False
11. Misolni yolg’onlikka tekshirish.
a = 2 == 0
b = 2 > 0
print((a or b) and (a and b))
natija: False
12.Misolni rostlikka ifodalang.
a=int(input("a ni kiriting="))
print((a<=5) or (a>=0) and (a<3))
natija: a ni kiriting=5
True
13. Misolni rostlikka ifodallang.
c=int(input("c ni kiriting="))
print((c<=5) or (c>=0) and (c<3))
natija: c ni kiriting=6
False
14. Ifodani rostlikka isbotlang
a=8
b=a**3
print(f"1-ifoda={anatija: 1-ifoda=True
15. Misolni yolg'onlikka ifodalang
a=10
b=a*3
print(f"ifoda={a<=b/4}")
natija: ifoda=False.
16. Uch xonali son berilgan.Uni chapdan o'ngga qarab, o'ngdan chapga qarab o'qisak ham bir xil bo'lishini rostlikka tekshirish.
a=121
yuz=a//100
bir=a%100%10
print(bir==yuz)
natija: True
17. Uch xonali son berilgan.Uni chapdan o'ngga qarab, o'ngdan chapga qarab o'qisak ham bir xil bo'lishini yolg'onlikka tekshirish.
a=234
yuz=a//100
bir=a%100%10
print(bir==yuz)
natija: False.
18. A,B,C sonlar berilgan.diskiriminant formulasidan foydalanib misolni rostlikka ifodalang.
a=1
b=4
c=2
d=(a>0 or a<0)
s=b**2-4*a*c
print(d,s)
natija: True 8
Download 14,52 Kb.




Download 14,52 Kb.

Bosh sahifa
Aloqalar

    Bosh sahifa



Referati termiz 2023 mavzu: mantiqiy amallar misolni yolg’onlikka tekshirish

Download 14,52 Kb.