2.2 Programming Fundamentals Flashcards
Sequence
structuring programs in a sequential order
Selection
programs branching depending on a condition
Counter-controlled iteration
repeating specific code, where the number of iterations are needed to be inputted
condition-controlled iteration
repeating specific code, where the number of iterations depend on a given condition
What is a variable
container storing data value that can change
What is a constant
value that doesn’t change while the program is running
What is assignment?
Giving a variable/constant a value
What is casting
converting from one data type to another
Why is casting needed
subproblems receive data in a format they are expecting
What is the similarity and difference between a function and procedure?
They both receive a parameter.
Function returns an output but a procedure doesn’t