- 1
Why?
Why???
3 Antworten
+ 4
Because!!!
+ 1
Boolean logic should not be hard.
First:
You might want a way to get booleans, you can get them by comparing values with simple comparison operations you might have learned in school:
(==, <=, >=, <, >, !=)
Comparison operator*
Second you might want to use multiple booleans to get wanted boolean, you can get them by using logical operations, might not be taught in school:
(and, or, not)
Logical operations*
Last you might want to use the final boolean value in a conditional statement or a loop:
(if, else, elif, "while")
Conditional statements*
*Comparison operators take in any values and return a boolean.
*Logical operators take in booleans and return a boolean.
*Conditional statements take in booleans and runs a block of code depending on the boolean.