Weaknesses 2.1 - 2.5 Flashcards
(21 cards)
Symbol for MOD
%
Symbol for DIV
/ /
Casting?
Changing one data type into another
Types of Input Validation
Range Check - Checks data is within a certain range.
Type Check - Checks data is a certain data type.
Format Check - Checks data is entered in a certain way.
Presence Check - Checks that data has actually been entered and not left blank.
Lookup Table - A table of acceptable entries, also known as a list.
Length Check - Checks the length of the input is within a certain amount.
Iterative Testing
The programmer develops a module, tests it and repeats this process until the module works as expected.
Final Testing
This testing takes place once all modules have been individually tested to ensure the whole program works as originally expected.
Details of High Level Languages
Easier to understand than Low level Language
Similar to human language
Must be translated into machine code for CPUs as they be executed directly
Fewer errors
Details of Low Level Languages
Two types - Machine Code, Assembly Language
Hard to read and understand
Machine code can be directly processed and executed
Executes faster
Details of Compiler
Executes program all at once/ Translates all source code at once
Faster run programs- More efficient
Large complex programs
Shows all errors in the program at the end
Details of Interpreter
Translates code one line at time
Slower than compiler
Smaller, simpler programs
Encounters the error and then reports it to the user immediately and stops the program from running
Contents of IDE
Error Diagnostics
Syntax Highlighting
Line Numbers
Code Editor
What : equal to
Then
How to add to a list?
.append
How to delete from list?
.pop
How to find length of a list
len
E.g length = len(dates)
How to sort a list?
.sort()
How to read, write and add to a file?
r , w , a
E.g (“customers.txt”,”r”)
(“customers.txt”,”w”)
(“customers.txt”,”a”)
Maintainability
Comments - To understand the purpose of each line of code
Subprograms - To reuse code, Easier to test
Indentation - To Improve readability
Appropriate variable names - Ensuring the purpose of a variable is immediately understood
Using Constants - Keeps code consistent,Making it easier to read and debug
Abstraction
Ignoring unnecessary information and focusing on important facts
Declare an array
array names[4]
Declare 2D array
array grid[3,5]