decision making in python
04. DECISION MAKING IN PYTHON
v
Decision
making statement: - A
statement which is used to making the decision is known as decision making
statement.
v
Conditional
statement: - A
statement is used to creating a condition in a program is known as conditional statement.
àThere are three types of
conditional statement:-
i.
If
… statement.
ii.
If
……..else statement.
iii.
If
……elif……else statement.
v
If…
statement: - It
is a conditional statement.
àIt is also known as simple if
statement.
àIt is used to create a single condition
in a program.
FLOWCHART
True
Block Statement (S)
False
True
v
If…else
statement: - It
is a conditional statement.
àIt is also known as double
selection statement.
àIt is used to create double
condition in a program.
FLOWCHART
True
Block Statement (S)
False
True
If….elif….else
statement: - It is a conditional statement.
It is used to create more than two decisions in
a program.
FLOWCHART
Statement 1
True
Statement 2 Statement (X)
False
v Branching:
- Branching means two or more statement within another
statement.
àIn
python there are following branching statement: -
i.
If…. Statement.
ii.
If.… Else Statement.
iii.
If…. Elif…. Statement.
iv.
Nested…. If…. Else Statement.
Comments
Post a Comment
Hello students
If you have any doubt then let me know.