Fundamental Programming Flashcards
integer
a value which is a whole number
real
a value which is a number containing a decimal point
Boolean
a value which can be TRUE or FALSE
Character
A value which contains a single character-(letter , symbol or digit)
String
A value which contains a sequence of characters
Variable
Variables contain values which CAN change
Constant
A constant value CANNOT be changed once assigned
Declare/Declaration
The process of informing the computer of a new variable and the type of data it will contain
Assign/Assignment
The process of giving a value to a variable
Execute
The process of a computer carrying out an instruction
Statement
An instruction for a computer programme to execute
Condition
A statement which will either evaluate to TRUE or FALSE
Iteration
Where code repeats-also known as a loop
Definite Iteration
Also known as count controlled iteration- where a loop repeats code a specific number of pre-determined times, often in a FOR loop
Indefinite iteration
Also known as condition controlled iteration- where a loop repeats until a condition is no longer met, often in a WHILE loop
Selection
The program preforms a check list against a condition and responds accordingly, often in an IF loop
Nested
Where a statement is contained within another statement(nested loop, nested selection loop)
Subroutine
Programmers create these to prefrom a specific job
Procedure
A type of subroutine that executes code that does a specific job.
Function
A type of subroutine which returns a value when finished
Subroutine Interface
Consists of the subroutine identifier, any parameter, and the return value
Random Numbers
Numbers are generated using a built in algorithm and are not truly random numbers
Data Structures
Data Structures enable multiple pieces of data to be held together. they can include arrays and records
Array
A 1d array is a list. A 2D array is a table. All data must be the same data type
Record
A record allows a programming to group many variables together in a single descriptive varaible.
Compiler
Takes the entire source code and converts it in to machine code, meaning the source code does not need to be destributed.
Interpreter
translates the source code one line at a time. slower than a compiler but allows faster changes to be made
Assembler
Translates assembly language in to a machine code.
Machine Code
The binary patterns interpreted by a CU
Source Code
The written code produced by a programmer
Low Level Language
Assembly is a low level language which gives the programmer more control over the CPU and memory
High Level Language
Examples include visual basic. easy for humans to use, but needs compiled to machine code for computer to execute
Length
Finds the length of a string(or array)
Position
Finds the index within a string
Substring
Returns a part of a string, from beginning ,middle, or end.
Concatenation
Join two strings together to form a new string
Global Scope
Variables that can exist throughout the entire computer program
Local Scope
Variables that only exist in specific code block and are deleted when the code being executed moves outside the code block
Increment
Increase by 1
Decrement
Decrease by 1
Defensive Programming
Planning for errors to occur by trying to predict and handle them with selection or iteration
Robust
Code that does not cause run time errors
Run Time Errors
A code error that causes whilst a computer program is executing ,possibly causing it to crash
Syntax Error
A human mistake with the structure of the programming code meaning a high level language cannot compile
Logic Error
Code which is correct in the view of the computer, but does not execute as expected
Sequence
The order of actions and instructions