Python tutorial lesson 4 booleans

Veröffentlicht am: 12 Februar 2019
auf dem Kanal: BoardCode
20
2

This is the 4th lesson of Python tutorial. In tho lesson we'll talk about booleans and some built-in functions in Python.
You can read the lesson here : https://bit.ly/2SJU5SZ

The naming of Boolean is inspired by the British George Bool's name .

Booleans are objects can hold only truth values, truth values are either True or False .

True and False must be capitalized in programming.

Operations on booleans:

There are three operations could be applied on booleans, which are and,or and xor.

And,or and xor are called "logical operators".

And-operator

The operator and returns True as result if the two operands (objects) were true , otherwise, returns False

Examples :
True and True result is True
True and False result is False

Or-operator

returns True as result if one of the two operands (objects) were true.

Examples :
True or False result is True
False or False result is False

Xor-operator

returns True if the two operands (objects) weren't same.

Examples :
True xor False result is True.
True xor True result is False.
*****************************************************************
https://boardcode.blogspot.com/
  / boardcode-387065785376027  
  / board_code  
  / board__code  

#python #python_tutorial #booleans


Auf dieser Seite können Sie das Online-Video Python tutorial lesson 4 booleans mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer BoardCode 12 Februar 2019 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 20 Mal angesehen und es wurde von 2 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!