官术网_书友最值得收藏!

Boolean data type

A Boolean data type generally has only two values 'True' or 'False'. Boolean data type is a sub type of integers.

Syntax:

<variable name>=<'True' or 'False'> 

Boolean data types can be referred to as an on and off switch, which has only two values to chose from:

In the preceding example, we try to compare the value of x with the value of y, and when we use the == operator, the value of the Boolean is returned as True.

主站蜘蛛池模板: 华阴市| 边坝县| 泰兴市| 西乌珠穆沁旗| 安多县| 南城县| 潮州市| 沈阳市| 泽州县| 陆良县| 山阴县| 克拉玛依市| 汝州市| 台前县| 神池县| 长泰县| 永嘉县| 凌源市| 谢通门县| 临澧县| 西乌珠穆沁旗| 固安县| 涟水县| 广水市| 英德市| 锦州市| 来宾市| 海宁市| 遂昌县| 仙居县| 钟山县| 井研县| 文昌市| 习水县| 丹巴县| 花莲县| 二连浩特市| 澄城县| 云南省| 崇义县| 教育|