SELECTION
STATEMENT
,Selection pattern
■ A selection control statement is a control statement providing
selective execution of instructions.
Prof.T.Archana PYTHON
,Control flow of decision making
Prof.T.Archana PYTHON
, Operator Description Examp
== If the values of two operands are equal, then the
condition becomes true.
(a == b) is no
!= If values of two operands are not equal, then
condition becomes true.
(a != b) is tru
> If the value of left operand is greater than the value
of right operand, then condition becomes true.
(a > b) is not
< If the value of left operand is less than the value of
right operand, then condition becomes true.
(a < b) is true
If the value of left operand is greater than or equal
>= to the value of right operand, then condition
becomes true.
(a >= b) is no
If the value of left operand is less than or equal to
<= the value of right operand, then condition becomes
true.
(a <= b) is tr
Prof.T.Archana PYTHON
STATEMENT
,Selection pattern
■ A selection control statement is a control statement providing
selective execution of instructions.
Prof.T.Archana PYTHON
,Control flow of decision making
Prof.T.Archana PYTHON
, Operator Description Examp
== If the values of two operands are equal, then the
condition becomes true.
(a == b) is no
!= If values of two operands are not equal, then
condition becomes true.
(a != b) is tru
> If the value of left operand is greater than the value
of right operand, then condition becomes true.
(a > b) is not
< If the value of left operand is less than the value of
right operand, then condition becomes true.
(a < b) is true
If the value of left operand is greater than or equal
>= to the value of right operand, then condition
becomes true.
(a >= b) is no
If the value of left operand is less than or equal to
<= the value of right operand, then condition becomes
true.
(a <= b) is tr
Prof.T.Archana PYTHON