Learning Python: The Ultimate Guide for Beginners to Coding with Python with Useful Tools



Download 2,02 Mb.
Pdf ko'rish
bet29/126
Sana01.01.2022
Hajmi2,02 Mb.
#285662
1   ...   25   26   27   28   29   30   31   32   ...   126
Bog'liq
Learning Python The Ultimate Guide for Beginners to Coding with

Logical Operators
These operators are used to test if a particular conditional statement is true or false. They include,
NOT, OR, and AND. However, there are rules that apply to these operators for them to either
return true or false. These rules are:
A NOT operator will return True only when the operand is false
An OR operator returns true if one of the operands is true
The AND operator returns true when both the operands are true
Here is an example. We will use number1 and number2 to represent true and false respectively.
number 1 = True
number2 = False
print ((“NOT number2 is: ” NOT number2))
print ((“number1 OR number2 is: ” number1 OR number2))
print ((“number1 AND number2 is: ” number1 AND number2))


The output will be as follow
True
True
False

Download 2,02 Mb.

Do'stlaringiz bilan baham:
1   ...   25   26   27   28   29   30   31   32   ...   126




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
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