Part 1 Flashcards
What are variables?
Variables are used to store information. A variable is an area of memory that has a unique name and value contained within it. This value can change as a program runs.
A variable is associated with a particular data type.
What is data?
Unprocessed information.
Explain the different data types.
Character, Integer, Real, Boolean
Characters store single characters, letters and symbols.
Strings store alphanumeric combinations.
Integers are whole numbers.
Real store numbers with decimal places and integers.
Boolean are True or False.
What is mod?
The remainder of a division
What is a sequence?
A set of instructions to be carried out. The sequence can contain any number of actions, but no actions can be skipped in the sequence.
What is an iteration?
A set of instructions that could be repeated zero or more times
What is an iteration?
What is a loop?
When to use for loop?
A set of instructions that could be repeated zero or more times.
Repeatedly execute a sequence of program statements until, as a result of this repetition; some condition for termination is satisfied.
If we knew how many times a loop is to be executed we can use another type of loop, the for loop.
Loops which are executed an UNKNOWN number of times awaiting some event must use either while do or do while
What are logical operators?
Logical operators are used for comparison
What is a case statement?
An alternative to if statement
Parameter?
In information technology, a parameter is an item of information - such as a name, a number, or a selected option - that is passed to a program by a user or another program. Parameters affect the operation of the program receiving them.
What is a data type?
a classification of data which tells the compiler or interpreter how the programmer intends to use the data.
What is parameter passing?
Parameter passing The mechanism used to pass parameters to a procedure (subroutine) or function. The most common methods are to pass the value of the actual parameter (call by value), or to pass the address of the memory location where the actual parameter is stored (call by reference).
What is a selection?
In a selection structure, a question is asked, and depending on the answer, the program takes one of two courses of action
What is a case statement?
A selection process with multiple outcomes as opposed to the traditional IF statement with two outcomes
What is modular approach?
Modular programming is the process of subdividing a computer program into separate sub-programs.