KnowledgeBoat Logo
|

Robotics & Artificial Intelligence

Write short notes on Boolean Constant.

Python Funda

3 Likes

Answer

Boolean constants are special literals that represent only two Boolean values, i.e., True or False. They can be used in a Python code to check whether a given logical condition is satisfied or not. The Boolean constants are written with their initial characters in capital letters (i.e., 'T' or 'F'). Writing them in lowercase (true or false) is incorrect and will raise an error in Python. It must be noted that Boolean constants (True or False) are never enclosed within single or double quotes. This characteristic makes Boolean constants different from string constants.

Answered By

1 Like


Related Questions