2.2.1 Programming Techniques Flashcards
Algorithm
A set of rules or a sequence of steps specifying how to solve a problem
Programming constructs
Sequencing
Selecting
Iteration
Variables
Identifiers given to memory locations whose contents will change during the course of the program
Global variable
A variable that can be used anywhere in the program
Local variable
Can only be used within the subroutine in which it is declared
Selection
Decisions made that determine the execution
Sequence
All lines are executed in order
Iteration
Code is repeated/looped until specific conditions are met
Subroutine
A named block of code which performs a specific task within a program
By value
It’s actual value is passed into the subroutine
By reference
The address is passed into the subroutine
Modularity
Breaking down large tasks into small subtasks.
Recursion
A subroutine that is defined in terms of itself
Parameter
Data structures passed into a procedure or function
IDE (integrated development environment)
A software package that helps write the code easily