D278 EXAMINATION QUESTIONS AND ANSWERS
A computer program consists of... - A computer program consists of instructions
executing one at a time. Basic instruction types are:
- Input
- Process
- Output
Input - A program gets data, perhaps from a file, keyboard, touchscreen, network, etc.
Process - A program performs computations on that data, such as adding two values like
x + y.
Output - A program puts that data somewhere, such as to a file, screen, network, etc.
Algorithm - A sequence of instructions that solves a problem is called an algorithm.
What is a flowchart? - A graphical language for creating or viewing computer programs.
What is the Coral language used for? - Learning to program.
What is a program in Coral? - A list of statements, each carrying out some action and
executing one at a time.
What is the role of an interpreter in Coral? - Running a program's statements.
What do variables do in a program? - Hold values, like a variable x holding the value 7.
What does x = 7 do in Coral? - Assigns the variable x with the value 7.
What does a parallelogram represent in a Coral flowchart? - An output statement,
written as: Put item to output
What does a cursor indicate in a Coral flowchart? - Where the next output item will be
placed in the output
What is a newline in a Coral flowchart? - A special two-character sequence \n that moves
the cursor to the next output line
A computer program consists of... - A computer program consists of instructions
executing one at a time. Basic instruction types are:
- Input
- Process
- Output
Input - A program gets data, perhaps from a file, keyboard, touchscreen, network, etc.
Process - A program performs computations on that data, such as adding two values like
x + y.
Output - A program puts that data somewhere, such as to a file, screen, network, etc.
Algorithm - A sequence of instructions that solves a problem is called an algorithm.
What is a flowchart? - A graphical language for creating or viewing computer programs.
What is the Coral language used for? - Learning to program.
What is a program in Coral? - A list of statements, each carrying out some action and
executing one at a time.
What is the role of an interpreter in Coral? - Running a program's statements.
What do variables do in a program? - Hold values, like a variable x holding the value 7.
What does x = 7 do in Coral? - Assigns the variable x with the value 7.
What does a parallelogram represent in a Coral flowchart? - An output statement,
written as: Put item to output
What does a cursor indicate in a Coral flowchart? - Where the next output item will be
placed in the output
What is a newline in a Coral flowchart? - A special two-character sequence \n that moves
the cursor to the next output line