Autumn Test Flashcards
What is the difference between a parameter and an argument?
Parameter = A parameter represents a value that the procedure expects you to pass when you call it. Argument = An argument represents the value that you pass to a procedure parameter when you call the procedure.
What is binary?
Base 2 number system which represents on/off or voltage/no voltage
What is a bit?
A binary digit, either 1 or 0
What is a byte?
A byte is 8 bits
What is hexadecimal or hex?
A number system based on 16s
How do you convert Denary to Hex?
Divide denary number by 16 until it can not be divided anymore
Why is hexadecimal used?
Hexadecimal is used to simplify binary number. It easier fro the human brain to remember ACE than 1010 1100 1110
Also it is easier to to convert binary to hexadecimal than decimal to hexadecimal
What is ASCII?
ASCII is code that gives each letter of the alphabet a deanery digit so that it can be understood by computers
It can go up to 128 characters
Most computers use ASCII to transfer data from one computer to another
What is a high level language?
A coding language that allow the user not to communicate with computers using binary instead the user uses a language which is similar to english
What is an example of a high level language?
Python
What is an example of machine code?
Binary
What is logic?
The study of the principles of reasoning. In computer science those principles relate to how you communicate with computers
What are the three basic logic structures in all programming languages?
Sequence
Selection
Iteration
What is the definition of sequence?
Running code top to bottom without skipping anything
What is the definition of selection?
A question is asked which produces a Boolean value (either true or false) and the action that follows depends on the answer
What is the definition of iteration?
This means looping or executing the same set of instruction a given number of times or until a specified result is obtained
What is a variable?
A variable points to a memory location containing a value (some data)
What is a constant?
Constants are special types of variable whose values stay the same, or only rarely change throughout the program.
If a constant changes it will not be in the normal running of the program but as some sort of configuration
What is the definition of an integer?
A whole number
What is the definition of a string?
Any characters including none
What is the definition of a boolean value?
True or false
What is the definition of a float/real?
A decimal number
What is the definition of Char/single character?
A single character, letter, number, punctuation mark
Why does a computer need to know what the data type is?
Because then the computer knows:
What process can be applied, e.g you can’t divide a string
How much memory space to be put aside, e.g a Boolean only takes up 1 bit of memory, whereas a String will take up much more
What is an assignment?
Giving a variable a value e.g name=’Harry’
What is the definition of a syntax error?
When the computer does not understand what is written because the code does not follow the rules of the language.
What is the definition of a runtime error?
When the syntax is correct but the computer does not understand the instruction.
What is the definition of a logic error?
When the code runs but the result is not what was expected
What is the definition of an algorithm?
A sequence of steps taken to solve a problem. The steps use the three basic logic structures; sequence, selection and iteration
What is the definition of abstraction?
Breaking a problem down into small parts and hiding how the code works
In pseudocode what symbol represents less than?
In pseudocode what symbol represents greater than?
>
In pseudocode what symbol represents less than or equal to
In pseudocode what symbol represents greater than or equal to?
> =
In pseudocode what symbol represents equal to?
=
In pseudocode what symbol represents not equal to?
≠
What is the definition of a boolean expression?
A expression that produces a boolean value
What are the three logic operators?
AND
OR
NOT
What are the requirements for a AND operator?
Both sides of the operator must be TRUE for it to be considered TRUE
What are the requirements for a OR operator?
Only one or more statement needs to be TRUE for it to be considered TRUE
What are the requirements for a NOT operator?
NOT turns a TRUE value to a FALSE and a FALSE value to a TRUE
What is the definition of validation?
Validation is the process of ensuring that the data is sensible not correct
What is the definition of an array?
A group of data items of the SAME DATA TYPE, which is stored under one identifier (name) in contiguous (one after the other) memory locations
Can be 1 or 2 dimensional
What is the difference between a function and a procedure?
A function returns a value while a procedure does something but does not return a value