{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Algorithms

This preview shows pages 1–16. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
The Algorithmic Machine That means I know how to follow a sequence of steps.
Control Structures Sequence Selection (or decision) Repetition

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Sequence Control Structure 1 - 9 1 - 9 1 - 9 1 - 9 STOP 1 - 9 Move Forward Move Backward Turn Right Turn Left Stop/Pause
Selection Control Structure ENDIF YES IF NO ??? ???

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Repetition Control Structure NEXT ??? ??? FOR #
A First Program START 5 4 STOP 1 END STOP 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
A Square Program START 5 4 STOP 1 STOP 1 5 4 STOP 1 STOP 1 5 4 STOP 1 STOP 1 END 5 4 STOP 1 STOP 1
A Better Square Program START 5 4 STOP 1 STOP 1 END FOR 4 NEXT

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Are 5 squares 5x as long? START END 5 4 STOP 1 STOP 1 FOR 4 NEXT FOR 5 NEXT 5x
Autonomous Operation

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
“Infinite” Repetition NEXT FOR 1
Selection Control Structure YES IF SL ON NO Do ??? if the left sensor is ON Do ??? if the left sensor is OFF

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Final Program: The Wanderer START 1 END IF FOR ∞ IF SL OFF IF SR OFF END IF YES YES NO NO YES IF SL ON 3 2 END IF NO NEXT 3 2 END IF IF SR ON YES NO
From Flowchart to Code BEGIN

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}