Python tutorial lesson 4 booleans

Опубликовано: 12 Февраль 2019
на канале: 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


На этой странице сайта вы можете посмотреть видео онлайн Python tutorial lesson 4 booleans длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь BoardCode 12 Февраль 2019, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 20 раз и оно понравилось 2 зрителям. Приятного просмотра!