Stage 7: Bee: Conditionals

Slides:



Advertisements
Similar presentations
If Statements, Try Catch and Validation. The main statement used in C# for making decisions depending on different conditions is called the If statement.
Advertisements

Nested if-else Statements.  Should be indented to make the logic clear.  Nested statement executed only when the branch it is in is executed. For example,
Lesson 5 - Decision Structure By: Dan Lunney
Figure 2.1 Symbolic representation of flow of control through the if statement © 2003 Brooks/Cole Publishing / Thomson Learning™
Chapter 4 Control Structures I. Objectives ► Examine relational and logical operators ► Explore how to form and evaluate logical (Boolean) expressions.
CHAPTER 2 ANALYSIS OF ALGORITHMS Part 2. 2 Running time of Basic operations Basic operations do not depend on the size of input, their running time is.
Basic Building Blocks of Programming. Variables and Assignment Think of a variable as an empty container Assignment symbol (=) means putting a value into.
Tutorial 4 Decision Making with Control Structures and Statements Section A - Decision Making JavaScript Tutorial 4 -Decision Making with Control.
Problem Solving Chapter 2. What is an algorithm? n A solution to a problem that is: –Precise –Effective –Terminating.
Oakkar Fall The Need for Decision Engine Automate business processes Implement complex business decision logic Separation of rules and process Business.
Stage 13 Bee: Conditionals
Python – Making Decisions Lecture 02. Control Structures A program that only has one flow is useful but limited. We can use if statements to make these.
Outcomes Putting Place Value and its associated language in perspective Understanding four important place value concepts Teaching and learning progressions.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
Lecture 2: Logical Problems with Choices. Problem Solving Before writing a program Have a thorough understanding of the problem Carefully plan an approach.
Basic Control Structures
Refer to Ivor Horton’s Beginning ANSI C++ The Complete Language, 3rd Ed. APress Media, LLC. Choices and Decisions if statement if-else statement Relational.
Computer Science: A Structured Programming Approach Using C1 5-2 Two-Way Selection The decision is described to the computer as a conditional statement.
Computer Science: A Structured Programming Approach Using C1 5-2 Two-Way Selection The decision is described to the computer as a conditional statement.
General Computer Science for Engineers CISC 106 Lecture 2^4 Roger Craig Computer and Information Sciences 03/23/2009.
1 Overview of Programming Principles of Computers.
Programming Fundamentals by Dr. Nadia Y. Yousif1 Control Structures (Selections) Topics to cover here: Selection statements in the algorithmic language:
STEP 3- DEVELOP AN ALGORITHM At this stage we break down the problem into simple manageable steps so that they can be handled easily.
Conditional statements and boolean expressions Arithmetic, relational and logical operators.
Flow Control in Imperative Languages. Activity 1 What does the word: ‘Imperative’ mean? 5mins …having CONTROL and ORDER!
Stage 6: Bee: Functions What do you remember from the last class? What did you like the best? Any questions?
Programming Logic and Design Fourth Edition, Introductory Chapter 2 Understanding Structure.
General Discussion of “Properties” The Pumping Lemma Membership, Emptiness, Etc.
CS-7081 Application - 1. CS-7082 Example - 2 CS-7083 Simplifying a Statement – 3.
Multiplying & Dividing Signed Numbers Dr. Sarah Ledford Mathematics Educator
PHP-language, conditional statements
© 2016, Mike Murach & Associates, Inc.
Vocabulary Algorithm - A precise sequence of instructions for processes that can be executed by a computer Low level programming language: A programming.
Decisions Chapter 4.
Oracle11g: PL/SQL Programming Chapter 2 Basic PL/SQL Block Structures.
Stage 11: Artist: Nested Loops
Chapter 4: Control Structures
Chapter 5 Decisions. Chapter 5 Decisions ssential uestion: How are Boolean expressions or operators used in everyday life?
Year 2 Autumn Block 4 Multiplication and Division
Chapter 4: Decision Structures and Boolean Logic
Compound Conditional Logic
Using the Priming Read Priming read (or priming input):
ALGORITHMS AND FLOWCHARTS
Decision Properties of Regular Languages
Chapter 16 Component-Level Design
Introduction to Programming
Stage 8: Maze: Conditionals
Computers & Programming Languages
L1-6 Notes: Algebra: Variables and Expressions
Stage 14: Bee: Debugging What is debugging?
Life Transitions 20 DECISION MAKING.
ALGORITHMS AND FLOWCHARTS
Chapter 4: Decision Structures and Boolean Logic
Webropol – Getting started 3
Three Special Structures – Case, Do While, and Do Until
Visual Basic – Decision Statements
Solving Percent Problem with Equations (7.2) Proportions (7.3)
Solving Percent Problem with Equations
Chapter 5: Control Structure
Flowcharting & Algorithms
Conditionals.
Easter Cards and symbols
Understand the interaction between computer hardware and software
Program Flow.
Mixed Up Multiplication Challenge
POWER CHALLENGES Several Ways To Solve 7 CHALLENGES.
Chapter 4: Decision Structures and Boolean Logic
WRITING AN ALGORITHM, PSEUDOCODE, AND FLOWCHART LESSON 2.
Control Structures.
Stage 4: Functional Suncatchers
Presentation transcript:

Stage 7: Bee: Conditionals http://the-bee-teacher.wikispaces.com/ Stage 7: Bee: Conditionals What functions have we used before? Why do we use functions?

Objectives Students will: Compare properties and values using >, =, < symbols Translate spoken language conditional statements into a program Execute an algorithm with a conditional statement Use conditional statements to make logic-based choices Nest conditionals to analyze multiple value conditions using if, else if, else logic Write functions that execute nested conditionals Objectives

Video https://studio.code.org/s/course3/stage/7/puzzle/1 Video

Example #1 It’s foggy. The bee can’t see. Is it a flower or a honeycomb? Help the bee make the right decision.

Example (more challenging) Example: Find out if the unknown object is a flower or a honeycomb. Your goal is to control the bee to find out. Example (more challenging)

Complete Stage 7 Progress your way through the stage Directions