Presentation is loading. Please wait.

Presentation is loading. Please wait.

Flowcharting & Algorithms

Similar presentations


Presentation on theme: "Flowcharting & Algorithms"— Presentation transcript:

1 Flowcharting & Algorithms

2 Key terms Abstraction - the process of hiding information that is not needed to know at the time; to use the overall essential concept with details hidden. Algorithm - a process to solve a problem. Function - a combination of variables and operators. Heuristic - a technique, a way to try to solve, an idea to use to look for the answer to a problem which may or may not be solved by the technique. Iteration - to do again, a repetition of an existing process. Method - a set of instructions telling a computer the operations to perform for a problem solution. NP - in computer science, problems that have an indeterminate answer; a choice of answers requiring more information to choose the best answer.

3 Key terms Operator - a character symbol like a plus sign in math, +, or a word or specially defined symbol usage in a programming language, that tells the computer to do something with variables. P - in computer science, problems that have a particular answer; a determinate problem. Procedure - another word for method. Solvable Problems - problems that can be solved with algorithms to an exact answer, a computer can find the exact answer. Unsolvable Problems - problems that are indeterminate in their solution for a computer. Variable - a programming word made up of letters, numbers, and/or allowable symbols which holds data for the program.

4 ALGORITHMS AND FLOWCHARTS
Computer programming can be divided into two phases: Problem solving phase Make an ordered sequence of steps that solves a problem. This sequence of steps is called an algorithm. Implementation phase Implement using a programming language.

5 Steps in Problem Solving
Pseudocode is an artificial and informal language that helps programmers develop algorithms. Pseudocode may be in informal English, combinations of computer languages and spoken language. Whatever works for you. First produce a general algorithm (one can use pseudocode). Refine your steps until you get to an easy sequence. Perhaps use numbers or bullets. The point is to simplify the language to an understandable process or event.

6 The Flowchart A Flowchart is another algorithm but graphical.
Shows logic solution Emphasizes individual steps and their interconnections A flowchart must have a start and stop. All steps in a flowchart must connect. Can’t leave a step “hanging” with no connection. e.g. control flow from one action to the next

7 Algorithms in alice 3 Alice word or phrase Explanation compare
use of operators <, <=, =, >, >= and others; a part of making decisions is deciding what problem has to be compared to allow for a decision do in order statement at the beginning of the myFirstMethod screen; tells the program that you are creating to do each of the following steps in the sequence that you have written them; found at the bottom of the myFirstMethod screen if an additional ordering is needed do together indicates that all of the statements in the body of the statement will be done at the same time; found at the bottom of the myFirstMethod screen decision a choice to be made,   example if   else function an algorithm that provides an answer if else if (condition true) do this else do this; found at the bottom of the code editor orientation an objects forward motion is always the way the object is facing;   other directions are relative to this procedure an action on an object; a method that the object can do use snap on the scene setup, top right;   allows the placement of objects at the same depth or varying depths in the scene


Download ppt "Flowcharting & Algorithms"

Similar presentations


Ads by Google