Course Content
Data Types in Python
Data Types in Python
Converting: bool()
This short practical chapter will get us acquainted with the bool()
function. You may recall that numbers can be converted to the boolean data type too: 1
means True
, and 0
means False
.
Note
We can put whatever we want into the
bool()
function, and everything except0
in different types (0
,0.0
), andNone
will lead toTrue
.
Task
You have three values here: -90
, None
, and "La vie est belle"
. Put them into the bool()
function (replace ___
) to make True_statement1
,True_statement2
equal True
, and False_statement1
equal False
.
Task
You have three values here: -90
, None
, and "La vie est belle"
. Put them into the bool()
function (replace ___
) to make True_statement1
,True_statement2
equal True
, and False_statement1
equal False
.
Everything was clear?
Converting: bool()
This short practical chapter will get us acquainted with the bool()
function. You may recall that numbers can be converted to the boolean data type too: 1
means True
, and 0
means False
.
Note
We can put whatever we want into the
bool()
function, and everything except0
in different types (0
,0.0
), andNone
will lead toTrue
.
Task
You have three values here: -90
, None
, and "La vie est belle"
. Put them into the bool()
function (replace ___
) to make True_statement1
,True_statement2
equal True
, and False_statement1
equal False
.
Task
You have three values here: -90
, None
, and "La vie est belle"
. Put them into the bool()
function (replace ___
) to make True_statement1
,True_statement2
equal True
, and False_statement1
equal False
.
Everything was clear?
Converting: bool()
This short practical chapter will get us acquainted with the bool()
function. You may recall that numbers can be converted to the boolean data type too: 1
means True
, and 0
means False
.
Note
We can put whatever we want into the
bool()
function, and everything except0
in different types (0
,0.0
), andNone
will lead toTrue
.
Task
You have three values here: -90
, None
, and "La vie est belle"
. Put them into the bool()
function (replace ___
) to make True_statement1
,True_statement2
equal True
, and False_statement1
equal False
.
Task
You have three values here: -90
, None
, and "La vie est belle"
. Put them into the bool()
function (replace ___
) to make True_statement1
,True_statement2
equal True
, and False_statement1
equal False
.
Everything was clear?
This short practical chapter will get us acquainted with the bool()
function. You may recall that numbers can be converted to the boolean data type too: 1
means True
, and 0
means False
.
Note
We can put whatever we want into the
bool()
function, and everything except0
in different types (0
,0.0
), andNone
will lead toTrue
.
Task
You have three values here: -90
, None
, and "La vie est belle"
. Put them into the bool()
function (replace ___
) to make True_statement1
,True_statement2
equal True
, and False_statement1
equal False
.