0

Python

I'm not really understanding the matter of boolean operator.

1st Mar 2025, 6:48 PM
Chancia Heureuse AKISSOHE
Chancia Heureuse AKISSOHE - avatar
3 Réponses
+ 12
Chancia Heureuse AKISSOHE , you have asked for *boolean operators*. these are: and, or, not they can be used for describing a relationship between multiple conditions in an if statement. a = 82 a > 70 # result is True a < 100 # result is True print(a > 70 and a < 100) # result is True # print(True and True) # result is True > it would be great if you could give us a *code sample*, where you get stuck with this topic.
1st Mar 2025, 7:43 PM
Lothar
Lothar - avatar
+ 5
Booleans only have 2 values True and False. They can be really useful when you want to check something to either start a part of a code or end it. If we were playing a game, you could use it to check that the gamer has a certain score, or item, or condition to finish the level or part or so on. Does that help or can you explain a bit more what your problem with understanding is?
1st Mar 2025, 6:56 PM
Ausgrindtube
Ausgrindtube - avatar
+ 1
do you understand boolean? True - False # yes = True, no = False are you a beginner? True - False # yes = True, no = False is it True? ....
1st Mar 2025, 7:01 PM
Mihaly Nyilas
Mihaly Nyilas - avatar