By: Ulearncoding
on April 04, 2020
/
Logical Operators
| Logical Operator | Sign | Description |
| Logical AND | and | दो conditions अगर True होती है तब ये True return करता है | |
| Logical OR | or | दो conditions में से एक भी condition अगर True होती है तब ये True return करता है | |
| Logical NOT | not | ये Operator false को true या true को false कर देता है | |
Logical AND(and) Logical Operator in Python
Source Code :
a = 5
b = 6
print((a<b) and (b>a))
Output :
True
Logical OR(or) Logical Operator in Python
Source Code :
a = 5
b = 6
print((a<b) or (b>a))
print((a<b) or (b<a))
Output :
True
True
Logical NOT(not) Logical Operator in Python
Source Code :
a = 5
b = 6
print(not(a>b))
print(not(a<b))
Output :
True
False
Tag:
Python
Program Life's Admin
We are.., This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
No comments: