Learning Intention I will learn about selection with multiple conditions.

Slides:



Advertisements
Similar presentations
1 Software Development Programming Language Features – Branching.
Advertisements

Controlled Assessment
Chapter 61 Post Test Loop Do statement(s) Loop Until condition Loop is executed once and then the condition is tested. If it is False, the loop is run.
Python quick start guide
Python Programming Using Variables and input. Objectives We’re learning to make use of if statements to enable code to ask questions. Outcomes Build an.
Chapter 3 Making Decisions
CMPS 1371 Introduction to Computing for Engineers CONDITIONAL STATEMENTS.
Slide 1 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Task 2 Briefing The Design of a Computer.
Computer Programming TCP1224 Chapter 5 The Selection Structure.
Task - Your task is to design a cushion.. In order to be successful you will need to carry out the following processes: Researching e.g. Cushions on the.
 Learning Intention: To understand why businesses are important to the Australian Economy.
Introduction to Text Based Coding. We’re learning to explore how text based programming works You will display and enter text into a window You will use.
Logical Operators.  Quiz  Let's look at the schedule  Logical Operators 2.
PH2150 Scientific Computing Skills Control Structures in Python In general, statements are executed sequentially, top to bottom. There are many instances.
Logical Operators.  Quizzes!  Let's look at the schedule  Logical Operators 2.
Copyright © 2014 Pearson Addison-Wesley. All rights reserved. 4 Simple Flow of Control.
© 2006 Lawrenceville Press Slide 1 Chapter 5 The If…Then Statement (One-Way)  Conditional control structure, also called a decision structure  Executes.
Core LIMS Training: Project Management
The Ohio State University
What’s New in ProMonitor 9
More on the Selection Structure
COMPUTATIONAL CONSTRUCTS
Chapter 4 The If…Then Statement
Introduction to Python
Repetition Structures Chapter 9
Learning Intention I will learn about the iterative software development process with a focus on the Design stage.
Introduction To Flowcharting
Starter Question In your jotter write the pseudocode to take in two numbers, add them together then display the answer. Declare variables RECEIVE firstNumber.
Lesson 9: "if-else-if" and Conditional Logic
Control Structures.
CREATING AND USING FILE FOLDERS
Lesson 8: Boolean Expressions and "if" Statements
Web Design and Development
Control Structure Senior Lecturer
Scratch: selection / branching/ if / If…else / compound conditionals / error trapping by Mr. Clausen.
DO NOW – Decompose a Problem
Design and Implementation
Selection Statements.
Input, Process, Output Washing dirty clothes Process Output Input.
3.1 Iteration Loops For … To … Next 18/01/2019.
Chapter 5: Control Structure
Conditional Execution
Learning Intention I will learn about evaluating a program.
Understanding Problems and how to Solve them by using Computers
Decision I (if Statement)
Learning Intention I will learn about programming using selection (making choices) with one condition.
if-else Structures Principles of Engineering
Module 4. Crafting Success Criteria
Software Development Process
No Yes START Do you live in Scotland? Take umbrella See last Flowchart
Boolean Expressions to Make Comparisons
Flowcharts and Pseudo Code
Tutorial 2: Algorithms.
Programming Concepts and Database
Class 4: Repetition Pretest Posttest Counting Flowchart these!
Learning Intention I will learn about testing programs.
Programming In Lesson 4.
Learning Intention I will learn about concatenation and arithmetic operators.
Learning Intention I will learn how to use an array to store data in a program.
Chapter 11 Conditional Execution
Learning Intention I will learn about the different types of programming errors.
7 Creating Claims.
Announcements Lab 3 was due today Assignment 2 due next Wednesday
Chapter 3: Selection Structures: Making Decisions
Writing Linear Equations
Chapter 13 Conditional Repetition
Learning Intention I will learn about the standard algorithm for input validation.
Pseudo-Code Conditional Branches
Computers and Scientific Thinking David Reed, Creighton University
Task - Your task is to design a cushion.
Presentation transcript:

Learning Intention I will learn about selection with multiple conditions.

Analysis Design Implementation Testing Documentation Evaluation

Multiple Condition Selection so far the programs you have created with conditions have had either one (IF) or two (IF and ELSE) possible outcomes sometimes our programs need to work for a number of different options

Multiple Condition Selection what is wrong with the following? e.g. deciding education level IF age >= 11 THEN SEND “secondary” TO DISPLAY ELSE SEND “primary” TO DISPLAY END IF

Multiple Condition Selection In addition to IF … ELSE … END IF we can also use ELSE IF to test multiple conditions

Multiple Condition Selection Pseudocode: IF age >= 17 THEN SEND “college/uni/job” TO DISPLAY ELSE IF age >= 11 THEN SEND “secondary school” TO DISPLAY ELSE IF age >= 4 THEN SEND “primary school” TO DISPLAY ELSE SEND “nursery” TO DISPLAY END IF

Multiple Condition Selection Be careful - only the first TRUE condition met will have the code inside it run

Multiple Condition Selection What is wrong with this? IF age >= 4 THEN SEND “school” TO DISPLAY ELSE IF age >= 17 THEN SEND “college/uni/job” TO DISPLAY ELSE SEND “nursery” TO DISPLAY END IF age = 12 age = 22

Programming Tasks Complete the tasks on pages 47 -> 48 Write the pseudocode design for tasks 2 and 3 as code comments before programming each one. Get your teacher to check them before coding.

Success Criteria I can make a program branch in multiple possible ways based on multiple conditions.