You are on page 1of 23

Introduction to

Decision Making
Prepared by: Mr. Mhel V. Anacio
LEARNING OUTCOME

▰ Understand the Assignment Operator.


▰ Learn the different types of Assignment Operator.
▰ Understand the Comparison Operator.
▰ Learn the different types of Comparison Operator.
▰ Know what is Decision Making in Python.
▰ Learn the different types of Decision Making in Python.
2
Assignment Operator

▰ These are used to assign values in variables.


Types of Assignment Operator:
Using Assignment Operator

Symbol Action Example

= Assign value c =a+b

a += b Add AND a=a+b

a -= b Subtract AND a=a-b

a *= b Multiply AND a=a*b

a /= b Divide AND a=a/b

3
Assignment Operator

4
ACTIVITY 2 – February 26, 2023

Create a program that will calculate two input


numbers using the previously discussed
Assignment Operators.

5
Comparison Operator
▰ Also known as Relational Operator.
▰ These are used to compare two values.
▰ It tells whether a statement is True or False according to the
condition.

6
Comparison Operator

7
Comparison Operator

8
Decision Making

▰ It is anticipation of conditions occurring while execution of the


program and specifying actions taken according to the
conditions.
▰ Decision structures evaluate multiple expressions which
produce TRUE or FALSE as outcome.

9
Decision Making

10
Example No. 1:

11
Example No. 2:

12
Example No. 3:

13
Example No. 4:

14
Example No. 5:

15
Example No. 6:

16
Example No. 7:

17
Logical Operator
▰ These are operators that are used to combine conditional
statements.

18
Example No. 8:

19
Example No. 9:

20
Example No. 10:

21

22
23

You might also like