0
Ok, Im new to coding & I'm not getting this boolean thing. As a beginner, do I need some sort of prerequisite?
Boolean code?
4 Respuestas
+ 6
This might help. Incudes a video. https://automatetheboringstuff.com/chapter2/
+ 5
boolean is just a datatype that can hold true or false value.
Its used in a lot of places, in your while condition, if/else conditions, switch statements, etc.
Anything related to comparison operators relates to bool values
You can view them as yes/no stuff.
+ 5
boolean is in two types true and false
if a=3
it is true boolean because it have a value
if b=0
it is false because it have no value
you can do things like this in puthon:
while True:
print("Hey")
this is an infinite loop because its always true,if it was false or it became false it will stop running
personally speaking: iam too a begginer
the things i understanded when i started learning were boolean and print etc...
boolean logic is easy actually
+ 1
Ok, So a Boolean is just a variable, that is true or false. So something that has a boolean condition needs something true(or false) to run!
so:
var boolean = true;
Boolean would be a boolean!