Control flow in python 3.

Control flow in python 3.

·

1 min read

Day 3

Booleans :

Booleans can have two values: True and False.

We can create them by comparing values, for instance by using the equal operator == like this:

Screen Shot 2022-04-01 at 19.30.10.png

--> Prints 'The value is true'

### Comparison :

It’s not just the equal operator (==) that creates Booleans though, oh no! You can use any of the comparison operators (and there are a few) to compare values and create a Boolean.

So what are the other comparison operators? Well, we’ve got: equal to ==, not equal to !=, greater than >, smaller than <, greater or equal to >=, smaller or equal to <=.

For e.g:

Screen Shot 2022-04-01 at 19.36.17.png

Questions:

Which of the following are the examples of booleans?

1) T & F

2) TRUE & FALSE

3) True & False

Comment Down!!