Source code is the code that we type into a programming language.
Flip it
What is executable code?
Flip it
What is executable code?
Executable code comes from the source code and is code the computer can understand. It is also called machine code.
Flip it
What is byte code?
Flip it
What is byte code?
Bytecode is code that is processed by a virtual machine (VM). The VM translates it to machine code.Examples of translators are Java Virtual Machine, Python.
Flip it
What is an interpreter?
Flip it
What is an interpreter?
An interpreter executes instructions from source code.
Flip it
What is a compiler?
Flip it
What is a compiler?
A compiler is a program that converts source code into executable code.
Flip it
What are 3 types of code errors?
Flip it
What are 3 types of code errors?
Syntax, logical and run-time errors
Flip it good.
What is a syntax error? Give an example.
Flip it
What is a syntax error? Give an example.
A syntax error is a typo when you type in the source code. It is a mistake the programming language cannot compile. An example is a fullstop, or comma not used correctly. Incorrect spelling eg sing instead of string.
Flip it good.
What is a logical error? Give an example.
Flip it
What is a logical error? Give an example.
A logic or logical error is when the program runs, but doesn't do what it is supposed to do. eg using addition instead of subtraction in a formula.
Flip it good.
What is a run-time error? Give an example.
Flip it
What is a run-time error? Give an example.
A run-time error is an error that happens when the program is started and is running. Something stops it. Incorrect input. Lack of memory.
Flip it good.
What types of documentation are used in programming?
Flip it
What types of documentation are used in programming?
Internal documentation and external documentation. Internal with the code and external to the code.
Flip it good.
What is internal documentation? Give an example
Flip it
What is internal documentation? Give an example
This is commenting within your source code. It helps other programmers understand your code. eg in Python use a hash. #this is a comment in Python
Flip it good.
What is external documentation? Give an example
Flip it
What is external documentation? Give an example
This is documentation that explains how to use a program. It is for the end user or the person who needs to use the program. eg a user manual
Flip it good.
What are simple / primitive data types? Give common examples.
Flip it
What are simple / primitive data types? Give common examples.
Data types are how data is categorized. Examples are character (text), boolean (true/false), integer (number)
Flip it good.
What are complex data types? Give common examples
Flip it
What are complex data types? Give common examples
Complex data types can store data and include arrays and records.
Flip it good.
Explain data type - integer
Flip it
Explain data type - integer
Integer is a whole number in a range (4 byte is between -2,147,483,648 and 2,147,483,647. (2 byte is between -32,768 and 32,767). Note: never use commas in source code (syntax error results)
Flip it good.
Explain data type - real (floating point)
Flip it
Explain data type - real (floating point)
Real data types are numbers that can use a decimal point. Also called floating point.
Flip it good.
Explain data type - boolean
Flip it
Explain data type - boolean
Boolean only has two values to choose from 0 or 1 eg false or true
Flip it good.
Explain data type - character
Flip it
Explain data type - character
Character data type is a character from the keyboard. Characters can be combined to make data type - string.
Flip it good.
Explain data type - string
Flip it
Explain data type - string
A string is a sequence of characters. "often in quotes"
Flip it good.
Explain data type - array
Flip it
Explain data type - array
An array is a collection of values. A list. Note: must be an array of the same data type; string or int etc. They have brackets. eg aStringArray=("bill","sue")
Flip it good.
Explain data type - record
Flip it
Explain data type - record
A record is a collection of values that can be of different kinds. eg They can be a row in a table which shows age (int) name (string) etc
Flip it good.
What is a constant?
Flip it
What is a constant?
A variable that doesn't change. eg Pi could be used several times in a program and it will never change so it should be a constant variable.
Flip it good.
What is a variable?
Flip it
What is a variable?
It is a named memory location. These are stores that a program can access to reference or re-use.
Flip it good.
What is a local variable?
Flip it
What is a local variable?
A variable that is only available in the current code or module.
Flip it good.
What is a global variable?
Flip it
What is a global variable?
A variable that can be used in all parts of the program and are placed at the beginning of the program.
Flip it good.
What is a parameter?
Flip it
What is a parameter?
It is a referenced variable or constant that is passed to a function or module. It is the value that is needed for the program to operate. They can be passed into or out of a function or module. They usually have brackets (parentheses) around them so they are easy to find.
Flip it good.
What are the three most common control structures?
Flip it
What are the three most common control structures?
sequence, selection and iteration
Flip it good.
What are the different types of selection?
Flip it
What are the different types of selection?
one-way (if then), two-way (if then else) and multi-way(case, nested if)
Flip it good.
What are 3 different types of iteration?
Flip it
What are 3 different types of iteration?
test first (while), test last( repeat until) and fixed(for)
Flip it good.
What is a stub?
Flip it
What is a stub?
A stub can be a placeholder for future code. It identifies code yet to be developed.
Flip it good.
What is a function?
Flip it
What is a function?
A function is a procedure or routine that returns a result. It returns a value when called.
Flip it good.
What is a statement?
Flip it
What is a statement?
Is a line of code causing some action to be carried out.
Flip it good.
What is a module?
Flip it
What is a module?
A chunk of code that can return a value or possibly not return a value. We use modules so we can organise code into useful organisational chunks. For example you may have a module called calculateTax that when called conducts the calculateTax component of a program.
Flip it good.
What is a trace table and how is it used?
Flip it
What is a trace table and how is it used?
It is a test procedure for a program. The table progresses through the code one line at time to test chosen values in order to find logic errors.
Flip it good.
What are structure charts?
Flip it
What are structure charts?
Structure charts are a drawing of the modules in a program. The main module is uppermost and other modules are under that. There are data values that flow between these modules and there are also control values (these are true/false values) Some call them data couples or control couples.
Flip it good.
What is data validation techniques? and Name two types of validation.
Flip it
What is data validation techniques? and Name two types of validation.
It is a process to make sure correct data is entered into a field. Range checking sets a low and high. For example entry of month of birth has range of 1 to 12 only. Type checking ensures data is of the expected data type. eg a string entered into an age field would be incorrect.
Flip it good.
What is scope and lifetime of identifiers?(variables and other user defined words)
Flip it
What is scope and lifetime of identifiers?(variables and other user defined words)
This refers to parameters and for scope it means the boundary where the parameter exists. The lifetime of an identifier is dependent on how it is passed.
Flip it good.
What is the scope and lifetime using value passing?
Flip it
What is the scope and lifetime using value passing?
A parameter which outputs its actual value. It is passed and always has the original value.
Flip it good.
What is the scope and lifetime using reference passing?
Flip it
What is the scope and lifetime using reference passing?
A parameter passed by reference refers to the original location of the parameter's value. It is like just passing the link to the original which never changes.
Flip it good.
algorithms
What is an algorithm?
Flip it
What is an algorithm?
An algorithm is a sequence of steps to solve a problem.
Flip it
Who would use an algorithm?
Flip it
Who would use an algorithm?
Anyone who needs to follow a sequence of steps to solve a problem.
Flip it
When would algorithmic thinking be used?
Flip it
When would algorithmic thinking be used?
Algorithmic thinking can be used in computer programming. It can also be used in everyday life. Whenever you need to follow a sequence of steps to solve a problem.
Flip it
How do you plan an algorithm?
Flip it
How do you plan an algorithm?
Find a problem that needs a solution. Think how to solve it by breaking it down into small steps. Put the steps into the correct order.
Flip it
What is an example of algorithmic thinking NOT using computers?
Flip it
What is an example of algorithmic thinking NOT using computers?
Planning how to get to the city using a bus for the first time. Check what you are wearing. Get the bus money. Find out what time the bus leaves. Go to the bus stop. Hail the bus. Get onto the bus. Pay the money to the driver. Sit down on a seat.
Flip it
What is an example of algorithmic thinking using computers?
Flip it
What is an example of algorithmic thinking using computers?
Accepting a password to login to a computer. Set and store password. Enter password. If correct can login, else, can't login.