Topic 2 - Programming Flashcards
(32 cards)
What is a Data type ?
How the data is used and represented
Data type examples ?
Integer, float, character, float, boolean and string
What is a definite loop ?
For loop - ends at a fixed value
What is an indefinite loop ?
While loop - ends once a condition is met
Nested loops
A loop within a loop
Selection examples
If, elif and else
What do subroutines include ?
Procedures and functions
What does a procedure do ?
Once a task has been completed, it may not return a value
What does a function do ?
Once a task is completed, a value will always return
How is addition represented in programming?
+
How is subtraction represented in programming ?
-
How is division represented in programming ?
/
How is integer division represented in programming ?
\
How is a modular represented in programming ?
MOD
How is multiplication represented in programming ?
*
Records
Multiple pieces of data belonging to different data types
Arrays
Like a variable (has a name, data type, etc) but instead can store many pieces of data.
Data Validations
Process that checks on data
What is a presence check?
If anything is entered, it is accepted, if nothing is entered then it is invalid.
What does a range check handle?
Numbers and Dates
What does a Type check do?
Makes sure the correct data type is used
What does a length check do?
Checks appropriate number of characters entered for things like usernames and passwords.
What is a format check?
It is a type check for individual characters. It ensures that characters are in the correct place. An example would be for a national insurance number.
What does a look up check do?
Makes sure that data that is entered actually exists within a list.