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

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.

主站蜘蛛池模板: 郓城县| 宁波市| 隆化县| 滨州市| 兴宁市| 罗定市| 冷水江市| 凉城县| 临夏市| 望奎县| 白玉县| 岳池县| 安达市| 嘉峪关市| 南平市| 贡觉县| 沭阳县| 榕江县| 奈曼旗| 渝北区| 大名县| 德兴市| 仪陇县| 育儿| 洮南市| 山东| 洛阳市| 揭东县| 剑川县| 大埔区| 双江| 镇宁| 正宁县| 三河市| 汾西县| 荃湾区| 贵阳市| 桓仁| 白城市| 民丰县| 交城县|