3.1.3 Program Flow control_1 Understand the need for structure Breaking things down.

Slides:



Advertisements
Similar presentations
Introduction to Programming
Advertisements

Repetition Control Structures School of Business Eastern Illinois University © Abdou Illia, Spring 2003 (Week 9, Friday 3/07/2003)
1.4 Programming Tools Flowcharts Pseudocode Hierarchy Chart
PSEUDOCODE & FLOW CHART
Understanding the Three Basic Structures
An Object-Oriented Approach to Programming Logic and Design
Programming Logic and Design Seventh Edition
CS0004: Introduction to Programming Repetition – Do Loops.
Programming Logic and Design Seventh Edition
Chapter 3 Planning Your Solution
1. Know the different types of flow block 2. Understand how problems can be broken down into smaller problems.
PROGRAMMING, ALGORITHMS AND FLOWCHARTS
Introduction to Programming. What is a Program  Set of Instructions that tells the computer what to Do.  Driving force behind the computer  Without.
Design the program Create a detailed description of program –Use charts or ordinary language (pseudocode) Identify algorithms needed –Algorithm: a step-by-step.
TMF1013 : Introduction To Computing Lecture 1 : Fundamental of Computer ComputerFoudamentals.
Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer.
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 2: Flowcharts.
Conditions. Objectives  Understanding what altering the flow of control does on programs and being able to apply thee to design code  Look at why indentation.
Lecture 2 Numerical Methods for Engineering MECN 3500 Department of Mechanical Engineering Inter American University of Puerto Rico Bayamon Campus Dr.
Programming Structure
Programming Fundamentals. Thinking about Programming Robots are made to perform useful tasks. Each robot is designed to solve a specific problem, in a.
L061 Algorithms, Part 3 of 3 Topics Top down-design Structure charts Reading Sections , 3.3.
1 Programming Tools Flowcharts Pseudocode Hierarchy Chart Direction of Numbered NYC Streets Algorithm Class Average Algorithm.
Programming Logic and Design, Introductory, Fourth Edition1 Understanding the Three Basic Structures Structure: a basic unit of programming logic Any program.
Topic: Control Statements. Recap of Sequence Control Structure Write a program that accepts the basic salary and allowance amount for an employee and.
Problem-solving with Computers. 2Outline  Computer System  5 Steps for producing a computer program  Structured program and programming  3 types of.
3.1.3 Program Flow control Structured programming – SELECTION in greater detail.
Expressing Algorithms as Flowcharts and Pseudocode
Programming Logic and Design Fifth Edition, Comprehensive
Algorithms and Pseudocode
Problem Solving.  Similar to Solving Math Word Problem  Read the Problem  Decide how to go about Solving the Problem  Solve the Problem  Test the.
CMPT 120 Topic: Searching – Part 2 and Intro to Time Complexity (Algorithm Analysis)
Phase 3: Game Creation. Phase 3: Game Creation Outcomes (Slide 1) I can create a flowchart to solve a problem, for example to make a cup of tea. I can.
Program Design & Development EE 201 C7-1 Spring
Algorithms and Flowcharts
Learning outcomes 5 Developing Code – Using Flowcharts
Programming Logic and Design Seventh Edition
REPETITION CONTROL STRUCTURE
Programming Logic and Design Eighth Edition
Loops CS140: Introduction to Computing 1 Savitch Chapter 4 Flow of Control: Loops 9/18/13 9/23/13.
Learning to Program in Python
Computers & Programming Languages
Global Challenge Night Sensor Lesson 2.
Problem Solving: Structure Charts
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Night Sensor Lesson 2.
Modules Programmers break programming problems down into smaller, reasonable units called modules, subroutines, procedures, functions, or methods When.
Global Challenge Night Sensor Lesson 2.
PYTHON: BUILDING BLOCKS Sequencing & Selection
Click to add Text Computers & Instructions. Computers are given instructions in the form of computer programs that are created through the development.
ICT Gaming Lesson 2.
Global Challenge Night Sensor Lesson 2.
Global Challenge Walking for Water Lesson 2.
Starter....
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Night Sensor Lesson 2.
Algorithms, Part 3 of 3 Topics Top down-design Structure charts
Global Challenge Night Sensor Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
Programming Techniques
Presentation transcript:

3.1.3 Program Flow control_1 Understand the need for structure Breaking things down

Start - Keyword challenge – so far...

Lesson outcomes Understand why we should design a programming solution Know the difference between a structure chart and a flow chart Be able to feedback why its an advantage to have structured programming. Be able to feedback the 3 fundamental building blocks in programming structures

Quick one - Why design? Give 5 reasons why you would take time to design and plan a program solution before sitting and coding it...

Quick one - Why design? Give 5 reasons why you would take time to design and plan a program solution before sitting and coding it...

Program Control Structure Brief introduction to the fundamental building blocks in structured programming. 1.Sequence - 2.Selection - 3.Iteration (looping, repetition) -

Why break programming down? (Revision from before half term) Why is it an advantage to have structured programs? Scenario: You have been asked to create a coded solution that works out employees wages each month. We have already said that we wouldn’t just dive in – we would design it first.

Why break programming down? (Revision from before half term) Scenario: You have been asked to create a coded solution that works out employees wages each month. Lets try and break down the task into smaller tasks. (MODULES)

Why break programming down? (Revision from before half term) What’s the advantage? Answer these: Common sense: 1.What advantage is there to splitting a coded solution up into smaller defined modules? 2.What advantage is there to a group of programmers working on smaller defined modules? 3.What advantage is there to working with smaller modules if the program needs updating or replacing?

Quick break – another reason to use structured program control

10 i = 0 20 i = i PRINT i; " squared = "; i * i 40 IF i >= 10 THEN GOTO GOTO PRINT "Program Completed." 70 END Action 1Action 2Action 3Action 4

Breaking down and solving problems in a graphical way... Structure chart “A breakdown of the different parts of a system”

Breaking down and solving problems in a graphical way... For smaller – coding projects: Top down structured flowchart methodology “A breakdown of the different parts of an algorithm or process”

Pay > 40K Pay income tax at 40%Pay income tax at 10% true false

Breaking down and solving problems in a graphical way...

Keywords/phrases used this lesson Sequence Iteration Selection Program flow Flow chart Structure chart Modules Algorithm Spaghetti code

Snakes and ladders – complete this flowchart Start End Slide down snake yes no