Presentation is loading. Please wait.

Presentation is loading. Please wait.

Algorithm The key is the step-by-step instructions.

Similar presentations


Presentation on theme: "Algorithm The key is the step-by-step instructions."— Presentation transcript:

1 Algorithm The key is the step-by-step instructions.
A computer is a machine designed to follow specific instructions very rapidly; BUT The computer does only and exactly what it is told. Computers cannot think! Computers cannot make assumptions Copyright © 2008 by Helene G. Kershner

2 Algorithm An algorithm written so that it can be carried out by a computer is called a program. To be understood by a computer, the program or algorithm must be written in a programming language. Copyright © 2008 by Helene G. Kershner

3 Algorithm – Problem Solving Steps
People naturally think at a level of abstraction far too complex for even the most abstract and futuristic computer. Get simple, get “stupid”, make NO assumptions. Define the problem Define the output Define the input Define the initial algorithm Refine the algorithm Define the program Copyright © 2008 by Helene G. Kershner

4 Algorithm Write an algorithm for tying your shoes.
Copyright © 2008 by Helene G. Kershner

5 Karel the Robot Karel’s World Very limited, 2-dimensional
Made up of Streets that go North and South (vertical) & Avenues that go East and West (horizontal) Where a Street and Avenue intersect is a Corner or an Intersection Streets and Avenues are described by their number, Ex. 3rd Street & 2nd Avenue would just be Street 3 and Avenue 2. Street 1, Avenue 1, is the origin, or the starting point. Locations are identified by their street and avenue address or location. Also contains, walls and beepers Copyright © 2008 by Helene G. Kershner

6 Karel the Robot beeper wall Karel
Copyright © 2008 by Helene G. Kershner

7 Karel the Robot Karel’s World Karel is a dim-witted R2D2 Walls Beepers
are made of “neutronium” they are obstacles Karel can see but cannot go through. Located one half block between streets or avenues Beepers are small pinging transmitters sit at corners and Karel can hear them. they can be picked up, carried, and put down at corners Copyright © 2008 by Helene G. Kershner

8 What can Karel do? Karel does not think. Karel is outstanding at following instruction! Karel can move forward (from one corner to the next) in whatever direction he is facing. Karel has a compass so he knows what direction he is facing. Karel has cameras so he can see the walls but only when he is half a block away He has sensors, a mechanical arm, and a beeper-bag He can hear beepers only if he is on the same corner He can pick up the beeper and put it in his beeper bag He can carry the beeper he has picked up from one location to another He can put take a beeper out of his bag an put it on an intersection. Copyright © 2008 by Helene G. Kershner


Download ppt "Algorithm The key is the step-by-step instructions."

Similar presentations


Ads by Google