Top-Down Design and Control Structures in Python
Classified in Computers
Written on in
English with a size of 3.35 KB
3/10/16 Notes
Chapter 7/8
Top-Down Design
Takes the most basic aspect of a program and breaks it down into subprograms.
Control Structure
An expression that determines the order in which a program executes.
In Python, this is an if statement.
It can also be a looping statement.
Boolean Expression
A "True or False" program statement.
Composite Data Types
Example:
- numbers[0] = 1066
- numbers[1] = 1492
- numbers[2] = 999
- numbers[3] = 553
- numbers[4] = 1892
Example Code:
for i in range(3):
print(numbers[i])
Arrays
When data is being read into an array, a counter is updated for each operation (e.g., for i in range(5)).
Sequential Search of an Unsorted Array
A sequential search examines each item in turn and compares it to the target item. If it matches, the item is found.... Continue reading "Top-Down Design and Control Structures in Python" »