QUESTIONS WITH ANSWERS RATED A+
✔✔Iteration (Flow Charts) - ✔✔Takes place when one or more instructions are
executed more than once. Also known as repetition. It is taking place when program
code contains the words LOOP, FOR, WHILE or REPEAT.
✔✔Function - ✔✔Carries out a subtask of a larger task for which the program is
responsible. It then returns a value. It also has a data type.
✔✔Procedure - ✔✔Carries out a subtask of a larger task for which the program is
responsible. It does not return a value.
✔✔Parameter - ✔✔A piece of data that is needed in order for a procedure or function to
run. (Input)
✔✔Argument - ✔✔What a piece of data is called as it is passed to a function or
procedure.
✔✔Built-In Functions - ✔✔Functions which have been written by other people, you can
call them without even seeing the code.
✔✔Modular Programming - ✔✔Breaking your program into separate procedures and
functions. It can simplify your coded solutions in two ways:
You get to choose the name of your procedure/function, which helps you to create code
that makes sense.
If a particular task is required multiple times, the code for that task can simply be placed
into a procedure or function, which can be called multiple times.
Since calling a function or procedure only requires a single line, this reduces the amount
of code needed, which reduces the likelihood of errors in the code.
✔✔Scope - ✔✔The visibility of a variable, constant, function or procedure in a program.
When you are writing code you can see or alter some variables and constants, but not
others. You can also call some functions or procedures, but not necessarily all of them.
✔✔Local - ✔✔Variables and constants can be local. Only visible within the function or
procedure in which it was declared. As soon as the function or procedure ends, the
variable/constant is gone.
✔✔Global - ✔✔Variables and constants can be global. They are visible throughout the
entire program. This variable/constant is only gone when the program has finished
running.
✔✔Private - ✔✔Functions and procedures can be private. This means it can only be
called from within the form, or class in which they exist.
, ✔✔Public - ✔✔Functions and procedures can be public. They can be called from
beyond their own form or class.
✔✔Syntax Error - ✔✔Happens when you do not follow the rules of the language you
are writing in. If your code contains a syntax error, it will either not compile or it will
crash when the erroneous line is reached.
✔✔Logic Error - ✔✔Does not cause the program to crash, although it does cause the
program to do something it shouldn't. It might, for example, produce an incorrect result
to a calculation. They are harder to find than syntax errors and they are only usually
identified by detailed testing.
✔✔Run-Time Error - ✔✔Might or might not cause a program to crash at some point, but
it will not prevent it from running. The error will not become apparent until the program is
executing.
✔✔Trace Tables - ✔✔A tool used for checking that a program will behave as you intend
it to by examining the value of each variable as it changes. They are usually used to
resolve logical errors.
✔✔Try Catch Block - ✔✔The program is told, rather than to execute some code, to try
to execute some code. This would then provide an alternative set of instructions to be
followed in case the attempt fails.
✔✔Bug - ✔✔In a piece of software, is a fault or error of some kind that prevents the
software from working as it should.
✔✔Debugging - ✔✔The process by which bugs are removed. There are tools available
to developers to help identify bugs, break points and variable watch. Trace tables and
the use of try catch blocks would be used alongside these tools.
✔✔Break Points - ✔✔Inserted at a line of source code at which execution will pause
(break). The developer can then examine the state of the program at this particular point
in execution. Multiple break point can be set throughout the code, which is a useful
feature as it allows the developer to view the execution of the program in something
resembling slow motion.
✔✔Stepping - ✔✔Moving from one break point to another, essentially watching program
execution in slow motion.
✔✔Variable Watch - ✔✔This feature allows the developer to keep track of a variable or
expression. This tool allows you to track the life of a variable expression to see if it is
correctly manipulated by the program.