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

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.

主站蜘蛛池模板: 长垣县| 长治市| 汉寿县| 康马县| 西城区| 武汉市| 嘉义市| 周宁县| 从江县| 读书| 郎溪县| 福贡县| 颍上县| 枞阳县| 遵化市| 靖江市| 武宁县| 景洪市| 故城县| 延川县| 沽源县| 承德市| 从江县| 饶河县| 周口市| 通州市| 喀喇沁旗| 新沂市| 全州县| 唐河县| 武安市| 忻城县| 惠州市| 织金县| 诸暨市| 满洲里市| 安国市| 女性| 和硕县| 措美县| 灵石县|