0% found this document useful (0 votes)
8 views17 pages

Intro To Programming Conditional Statements

The document introduces programming basics, focusing on conditional statements, pseudocode, and flowcharts. It explains how conditional statements control program flow based on conditions and provides examples of pseudocode and flowcharts for real-life scenarios. The document also includes exercises for practicing pseudocode and flowchart creation, along with discussions on challenges and logical thinking.

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)
8 views17 pages

Intro To Programming Conditional Statements

The document introduces programming basics, focusing on conditional statements, pseudocode, and flowcharts. It explains how conditional statements control program flow based on conditions and provides examples of pseudocode and flowcharts for real-life scenarios. The document also includes exercises for practicing pseudocode and flowchart creation, along with discussions on challenges and logical thinking.

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/ 17

Introduction to Programming:

Conditional Statements
Meeting 1: Concepts and
Foundations
Learning Objectives
• • Understand programming basics
• • Explain conditional statements
• • Identify decision-making structures
• • Introduce pseudocode and flowcharts
What is Programming?
• • Designing and building an executable
computer program
• • Includes: Algorithms, logic, input/output,
control structures
What are Conditional Statements?
• • Control structure based on conditions
• • Executes actions based on TRUE or FALSE
• Example:
• IF it is raining THEN take umbrella ELSE wear
sunglasses
Pseudocode Example
• IF temperature < 20 THEN
• PRINT "It is cold!"
• ELSE
• PRINT "It is warm!"
Flowchart Symbols
• • Oval – Start/End
• • Rectangle – Process/Action
• • Diamond – Decision/Conditional
• • Parallelogram – Input/Output
Flowchart Example
• Decision: Is temperature < 20?
• Yes → PRINT 'It is cold!'
• No → PRINT 'It is warm!'
Interactive Discussion
• • What is a real-life example of an 'if-else'
condition?
• • How can you use decision-making in your
daily routine?
Summary & Homework
• • Conditional statements are essential in
programming
• • Use pseudocode and flowcharts to visualize
logic
• Homework: Write pseudocode for a real-life
decision
Building Conditional Statements

Meeting 2: Pseudocode and


Flowcharts in Action
Review: Pseudocode Syntax
• IF user_age >= 18 THEN
• PRINT "Adult"
• ELSE
• PRINT "Minor"
Detailed Example – Login System
• BEGIN
• INPUT username, password
• IF username == "admin" AND password ==
"pass123" THEN
• PRINT "Login successful!"
• ELSE
• PRINT "Access denied."
• END
Flowchart for Login Example
• Start → Input username & password →
Decision
• Is input correct? Yes → Login successful
• No → Access denied → End
Exercise 1: Pseudocode
• Write pseudocode for checking if a number is:
• • Positive
• • Negative
• • Zero
Exercise 2: Flowchart
• Convert your pseudocode into a flowchart
• • Include Start, Input, Decision, Output, End
Discussion & Troubleshooting
• • What challenges did you face?
• • How did you solve them?
• • What did you learn about logical thinking?
Summary & Further Learning
• • Practice writing pseudocode
• • Use flowcharts to visualize logic
• • Explore online tools for flowchart design
• Q&A and sharing of insights

You might also like