Download presentation
Presentation is loading. Please wait.
1
An Introduction to Control Structures
2
Introduction to Control Structures
All computers programs, no matter how simple or how complex, are written using one or more the three basic structures Sequence Repetition Selection
3
The Sequence Structure
Follows each instruction in order Beginning at the first and ending with the last. You will find sequence structure in all programs.
4
The Sequence Structure
5
Algorithm The step-by-step instructions that accomplish a task.
6
The Repetition Structure
Directs the computer to repeat one or more instructions until some condition is met. Write the instructions the following Repeat XX times walk
7
The Repetition Structure
8
What If What if you don’t know precisely how many steps there are between Rob and the Chair? In this case, you simply need to change the condition.
9
The Repetition Structure
10
The Selection Structure
Make Decisions Driving a Car into the Intersection The Selection Structure alerts the computer that a decision needs to be made. Provides the appropriate action to take based on the result of that decision.
11
The Selection Structure
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.