sponsor

sponsor

Slider

Recent Tube

Business

Technology

Life & style

Games

Sports

Fashion

» » Logical Operators

Logical Operators

Logical OperatorSignDescription
Logical ANDandदो conditions अगर True होती है तब ये True return करता है |
Logical ORorदो conditions में से एक भी condition अगर True होती है तब ये True return करता है |
Logical NOTnotये 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

«
Next
Newer Post
»
Previous
Older Post

No comments:

Leave a Reply