Algorithms For Dummies


Introducing Python for Algorithm Programming



Download 7,18 Mb.
Pdf ko'rish
bet155/651
Sana15.07.2021
Hajmi7,18 Mb.
#120357
1   ...   151   152   153   154   155   156   157   158   ...   651
Bog'liq
Algorithms

  Introducing Python for Algorithm Programming 

     73


TABLE 4-6

Python Logical Operators

Operator


Description

Example


and

Determines whether both operands are true.

True and True is True

True and False is False

False and True is False

False and False is False

or

Determines when one of two operands is true.



True or True is True

True or False is True

False or True is True

False or False is False

not

Negates the truth value of a single operand. A true 



value becomes false and a false value becomes true.

not True is False

not False is True

Computers provide order to comparisons by making some operators more signifi-

cant than others. The ordering of operators is operator precedence. Table 4-7 shows 

the operator precedence of all the common Python operators, including a few you 

haven’t seen as part of a discussion yet. When making comparisons, always con-

sider operator precedence because otherwise, the assumptions you make about a 

comparison outcome will likely be wrong.


Download 7,18 Mb.

Do'stlaringiz bilan baham:
1   ...   151   152   153   154   155   156   157   158   ...   651




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2025
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish