Flashcards in Programming Deck (107)
Why is it necessary to have a variety of programming languages?
- different languages suit different jobs
- developers prefer certain languages
a series of instructions that are executed one after another.
follow the pattern: INPUT -> PROCESS -> OUTPUT
3 programming constructs
sequence, selection, iteration
do one statement after another in the correct order
do a set of statements based on conditions allow your code to make choices- otherwise known as branching
do a set of statements again and again (looping)
count controlled loops
repeat a set number of statements a fixed number of times
condition controlled time
repeat a set number of statements until a condition is met
a name refer to a particular memory location that is used to store data. The value of the data held in that memory location is not known when the program is written and can change while the program is running
name used to refer to a fixed value. The value is set when the code is written and cannot change while the program is running
a self-contained set of commands that can be called from different parts of the program. returns 0 or many values.
a sub-routine that make take one or more parameters and ALWAYS returns a value
uses of functions and procedures
breaking a problem into manageable sections
preventing duplicating sections of code when it is needed more than once in a program
why is manageable code important
easy to read, debug and easy to maintain
if both inputs are true the output is true else the output is false
if both inputs are true or one input is true the the output is true else the output is false
reverses the outcome of the expression
single equals, sets the value on the right equal to the value on the left
programming languages where the user gives step by step instructions of what to do
a low level language represented by mnenomics which represents the machine code. one-to-one relationship with machine code.
a way to classify programming languages based on their features.
3 programming paradigms
why can assembly code for one processor not work for another processor
each type of processor has its own unique instruction set