0

True. , False (Python)

Обьесните пожалуйста по подробнее Что делают True и False

20th Jan 2020, 7:56 PM
Мади
5 Answers
+ 1
I will happily answer your question if you translate your question into English. Sorry for not knowing Russian.
22nd Jan 2020, 1:37 AM
Alice
Alice - avatar
+ 1
Мади True and False are both boolean constant. when a condition is satisfied, it returns True, otherwise it returns False. For example, 3 == 3 returns True, while 3 == 4 returns False. In some earlier versions of Python True == False is valid. That means defining a variable named True with value False. But now True and False are reserved keywords so it is no longer valid.
22nd Jan 2020, 7:58 AM
Alice
Alice - avatar
0
They are values used as conditions for statements. if condition: codeblock if the condition is True then the codeblock is ran, otherwise the codeblock is ignored and the program will continue like the if statement never existed.
20th Jan 2020, 9:34 PM
Seb TheS
Seb TheS - avatar
0
(ENG) What do the True and False in Python?
22nd Jan 2020, 7:24 AM
Мади
0
True and False are just values used in conditions of if and while statements.
22nd Jan 2020, 7:51 AM
Seb TheS
Seb TheS - avatar