Stage 8: Maze: Conditionals

Slides:



Advertisements
Similar presentations
Md. Ahsan Arif, Assistant Professor, Dept. of CSE, AUB
Advertisements

Algorithms 10 IST – Topic 6.
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,
More on Algorithms and Problem Solving
CS107 Introduction to Computer Science Lecture 3, 4 An Introduction to Algorithms: Loops.
Fundamental Programming Structures in Java: Control Flow, Arrays and Vectors.
Lesson 5 - Decision Structure By: Dan Lunney
1/03/09 De 89 à 98. 1/03/09 De 89 à 98 1/03/09 De 89 à 98.
Chapter 4 Control Structures I. Objectives ► Examine relational and logical operators ► Explore how to form and evaluate logical (Boolean) expressions.
Tutorial 12 Working with Arrays, Loops, and Conditional Statements
Chapter 2: Algorithm Discovery and Design
Program Design and Development
Computer Science 1620 Programming & Problem Solving.
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.
Visual C++ Programming: Concepts and Projects
Problem Solving Chapter 2. What is an algorithm? n A solution to a problem that is: –Precise –Effective –Terminating.
Sentinel Logic Assumes while loops and input statements.
Prof. Todd Neller Gettysburg College
Stage 13 Bee: Conditionals
Pseudocode. Simple Program Design, Fourth Edition Chapter 2 2 Objectives In this chapter you will be able to: Introduce common words, keywords, and meaningful.
Pseudocode Simple Program Design Third Edition A Step-by-Step Approach 2.
Definition of Terms Software/Programs Programs that directs the operation of a computer system Set of instructions Codes Programming Process of planning,
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Lucas Bang Lecture 5: Introduction to C: More Control Flow.
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.
Control structures Algorithm Development Conditional Expressions Selection Statements 1.
Lecture 4: C/C++ Control Structures Computer Programming Control Structures Lecture No. 4.
Equipping And Empowering Teachers for a New ICT Framework Mark Dorling Digital Schoolhouse Coordinator Langley Grammar School Naace 3rd Millennium Hothouse.
`. Lecture Overview Structure Programming Basic Control of Structure Programming Selection Logical Operations Iteration Flowchart.
Chapter 8: MuPAD Programming I Conditional Control and Loops MATLAB for Scientist and Engineers Using Symbolic Toolbox.
Programming Logic and Design, Introductory, Fourth Edition1 Understanding the Three Basic Structures Structure: a basic unit of programming logic Any program.
Program Structures Chapter 5. 5 Branching Allows different code to execute based on a conditional test. if, if-else, and switch statements.
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.
Decision Making and Branching
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?
Pseudocode. Algorithm A procedure for solving a problem in terms of the actions to be executed and the order in which those actions are to be executed.
Control Structure  What is control Structure?  Types of Controls  Use the control structure in VBScript.  Example Summery.
。 33 投资环境 3 开阔视野 提升竞争力 。 3 嘉峪关市概况 。 3 。 3 嘉峪关是一座新兴的工业旅游城市,因关得名,因企设市,是长城文化与丝路文化交 汇点,是全国唯一一座以长城关隘命名的城市。嘉峪关关城位于祁连山、黑山之间。 1965 年建市,下辖雄关区、镜铁区、长城区, 全市总面积 2935.
Programming Logic and Design Fourth Edition, Introductory Chapter 2 Understanding Structure.
Loops causes program to execute the certain block of code repeatedly until some conditions are satisfied. Suppose you want to execute some code/s 10 times.
PHP-language, conditional statements
© 2016, Mike Murach & Associates, Inc.
Chapter 4 Repetition Statements (loops)
Stage 7: Bee: Conditionals
Introduction to Computational Thinking
Stage 11: Artist: Nested Loops
Transition to Code Upsorn Praphamontripong CS 1110
Chapter 5 Decisions. Chapter 5 Decisions ssential uestion: How are Boolean expressions or operators used in everyday life?
Using the Priming Read Priming read (or priming input):
Scratch: selection / branching/ if / If…else / compound conditionals / error trapping by Mr. Clausen.
Stage 14: Bee: Debugging What is debugging?
Algorithms Take a look at the worksheet. What do we already know, and what will we have to learn in this term?
Terms used in Multiplication
` Structured Programming & Flowchart
Three Special Structures – Case, Do While, and Do Until
Visual Basic – Decision Statements
Chapter 5: Control Structure
Computer Science Core Concepts
ICT Programming Lesson 3:
Program Flow.
Selection Structures: Single-alternative
Mixed Up Multiplication Challenge
Stage 3 Maze: Sequence.
Scratch 7B IT 1.
Stage 21: Artist: Patterns
Presentation transcript:

Stage 8: Maze: Conditionals http://bontips.blogspot.com/2010/08/laberintos-britanicos-de-setos.html What is a conditional? What kinds of choices can a bee, artist or zombie make?

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

Example #1 Example: Your goal is to move the Zombie to the plant by giving directions in order using a repeat until block.

Example ( more challenging)

Directions Complete Stage 8: Maze: Conditionals Progress through the levels