0% found this document useful (0 votes)
10 views20 pages

Introduction To Programming Conditional Statements

The document introduces conditional statements in programming, explaining their role in decision-making and providing examples of pseudocode and flowcharts. It outlines the learning objectives for two sessions, focusing on understanding, writing, and visualizing conditional logic. The second session emphasizes practical application through activities and group collaboration to reinforce the concepts learned.

Uploaded by

Jebs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views20 pages

Introduction To Programming Conditional Statements

The document introduces conditional statements in programming, explaining their role in decision-making and providing examples of pseudocode and flowcharts. It outlines the learning objectives for two sessions, focusing on understanding, writing, and visualizing conditional logic. The second session emphasizes practical application through activities and group collaboration to reinforce the concepts learned.

Uploaded by

Jebs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Introduction to Programming:

Conditional Statements
Session 1: Understanding If-Then
Logic in Programming
Learning Objectives
• Understand what conditional statements are
• Explain the role of conditions in decision-
making
• Identify keywords used in conditional logic
• Visualize conditional statements using
flowcharts and pseudocode
What are Conditional Statements?
• Conditional statements allow a program to
make decisions and execute actions based on
whether a condition is true or false.

• Example: “If it rains, bring an umbrella.”


Real-Life Examples
• If you're hungry, then eat.
• If the traffic light is red, then stop.
• If a student scores > 90, then give honors.
Pseudocode Syntax Example
• IF condition THEN
• action
• ENDIF

• Example:
• IF temperature > 37 THEN
• print "You have a fever"
• ENDIF
Flowchart Symbols Review
• Terminal (Start/End)
• Process (Rectangle)
• Decision (Diamond)
• Arrows (Flow direction)
Flowchart Example
• Example:
• Start → Is age >= 18? → Yes: “You can vote” /
No: “You cannot vote” → End
If-Else and Nested Ifs
• IF score >= 75 THEN
• print "Passed"
• ELSE
• print "Failed"
• ENDIF

• Nested Example:
• IF score >= 90 THEN
• print "With Honors"
Why Use Conditional Logic?
• • Allows dynamic decisions in programs
• • Used in games, apps, sensors, robotics, etc.
Summary
• In the next session, you'll write your own
pseudocode and draw flowcharts!
• Prepare: pencils, flowchart templates or
printed guides.
Introduction to Programming:
Conditional Statements
Session 2: Let’s Practice Pseudocode
& Flowcharts!
Today's Objectives
• Apply understanding by writing conditional
pseudocode
• Draw flowcharts representing decisions
• Collaborate and think critically to solve
problems
Quick Review
• What will this output?
• Is this condition true or false?
• What will happen if...?
Activity Instructions: Decision-
Maker Task
• Choose one real-life scenario:
• - Weather-based decision
• - Test pass/fail
• - ATM process

• Then:
• - Write pseudocode using IF/ELSE
• - Draw a flowchart
Sample Pseudocode & Flowchart
• Pseudocode:
• IF weather = "rainy" THEN
• bring umbrella
• ELSE
• wear sunglasses
• ENDIF

• Then draw corresponding flowchart


Process Questions
• How did you decide what condition to use?
• What problems did you encounter?
• Did your logic cover all possibilities?
Integration Questions
• How can conditional logic help in daily life?
• How does programming relate to
responsibilities?
• Why think about both true and false
outcomes?
Sharing Time
• Groups present pseudocode and flowchart.
• Feedback from peers and teacher.
Assessment Rubric (Optional)
• Clarity of logic (25%)
• Accuracy of pseudocode (25%)
• Correct flowchart design (25%)
• Creativity and relevance (25%)
Reflection & Exit Pass
• What did you learn today?
• What part was easiest or difficult?
• One question you still have?

You might also like