Posts

Showing posts from August, 2020

Logical Operator

Image
LOGICAL OPERATOR IN PYTHON Logical Operator are used to combine conditional statements. Logical operators are used to perform Logical operations. There are Three logical operators in python and operator or operator not operator 1. and operator :- It return True if both statements are true otherwise return false. Example:                    x=5                    y=10                     print(x<y and y>x) Output:True 2 .or operator :- It return True if one of the statements is true. If all statements are false then it return false as output. Example:                    x=5                    y=10                    print(x<y or y<x) Output: True ...

Comparison operator

Image
  In python, Comparison Operators Compare the value of two or more Operands and return the result on the basis of Boolean "True or False". Simply, Comparison Operators are used to compare one value to another.