Programming Flashcards
What is an IDENTIFIER?
Names given to variables and constants
How are values assigned? (python)
With an ASSIGNMENT STATEMENT (using the ‘=’)
What is CAMEL CASE?
Starting each new word with a capital e.g.
FirstName OR firstName
What is SNAKE CASE?
Using underscores to link words e.g.
First_Name OR first_name
How are values assigned? (pseudo code)
SET ….. TO
What are the different logic gates?
AND
OR
NOT
NAND (not, and)
XOR (strict or, can only be one OR the other, not both)
What are the different data types?
INTEGER: whole numbers e.g. 0, 3, 9, 255
REAL: any number e.g. 2, 5.6, 31/4 , 9.7243
BOOLEAN: can only be ‘True’ or ‘False’
CHARACTER: single letter, number or symbol e.g. C, 3, @
What is an array?
Data structure that can store multiple items of data, called elements, which are all of the same type of data under the same identifier
Why are arrays useful?
They increase the efficiency of a program
What is VALIDATION?
Checks that data that is input is sensible, reasonable and appropriate to be processed by the program
What is a SYNTAX error?
Grammatical mistakes
What is a LOGIC error?
Unintended output due to a fault in the logic of the algorithm
What is a RUNTIME error?
Occur as a result of the computer being asked to carry out an impossible operation
e.g. dividing by 0
What is DEBUGGING?
The process of identifying errors and then either correcting them or determining a way to work around them
How do you write to a text file? (pseudo)
WRITE
e.g. WRITE myFile.doc, “Hello World”