Instructor: All right, all right, All right.
So up until now, we've spent forever
talking about numbers and strings,
and you're thinking,
"Oh God, we have so many more to go through
"and my head hurts already".
Well, you know what?
I think you're gonna really, really
like this one because this one's really, really short
and they're called booleans.
And booleans in python is bool.
And bool, well, there's only two options.
A bool can either be true or false.
That's it.
How awesome is that?
You just learned booleans.
So a boolean I can assign to, let's say my Facebook profile.
I can say Andrei, or I can say name equals Andrei,
and make sure that we form this into a string.
And then I can say, well let's say we're creating
an even better social network
than Facebook or creating our own.
And this social network also has the "is cool" option
on your user profile.
And let's say for now, it's false.
You see over here that's being highlighted.
Now "is cool", is set to false,
but all of a sudden I'm thinking,
"hmm, my profile doesn't look good
"if is cool is set to false".
So I'm going to change that.
I'm going to say "is cool", is now equal to true.
Now my profile has been changed to "is cool",
is true, hooray.
And that's it.
Booleans represent this idea of true and false,
which in programming is kinda like saying zero and one,
they're logical values, right?
There's some logic that we can use
and we'll see when we talk about conditionals
in upcoming videos where booleans
become really, really useful because we can use booleans
to control the flow of our program to do something
if something is true, to do another thing,
if something is false.
It's a cornerstone of computer science.
And by the way, a topic we're gonna explore more
and more is this idea of using booleans to denote logic.
So for example, what do you think a bool of one
converting one to boolean would do?
If I print this and I click run, I get true.
And boolean one means true.
A zero, well, that equals false.
And remember, we're just simply converting this integer
into a boolean value.
And a boolean, well, is just either false or true,
nothing else, that's it.
And I can also convert a string that says true
into a boolean true.
Again, this is something we're gonna explore
a little bit more when we talk about conditional logic,
but I wanted to make this video nice and short
to let you know that,
"hey not all these data types are as complex as, well,
"numbers and strings".
All right, nice and short.
I'll see you in the next one.
Bye-bye.