Python Data Types Boolean

Boolean



In programming We should know if the given statements True or False. so we evaluate the statements in Python and get True  or False.

whenever we compare two or more value or expression ,and Python will return Boolean value (True or False)



And whenever you run a condition in an if statement, Python returns if the condition is True or False


In the above code we can see that if the given condition (x>y) is True then it will print ("x is greater than y") else it will print ("y is greater than x")



Comments

Popular posts from this blog

Prime numbers with Python

Python Installation