Foundations - D278 Exam Questions and
Answers 100% Solved
computer program - ✔✔set of instructions that a computer follows to perform
tasks. These tasks can be anything from playing a video on your phone to
helping a plane fly.
computer program instruction types - ✔✔Input: The program gets data from
somewhere.
Ex: Typing on a keyboard, touching a screen, reading a file, or receiving data
from the internet.
Process: The program does something with the data.
Ex: Adding two numbers together, sorting a list of names, or calculating the
average of some scores.
Output: The program sends data somewhere.
Ex: Displaying text on a screen, saving a file, or sending a message over the
internet.
1|Page
©KERRYMARTIN 2025/2026. YEAR PUBLISHED 2025.
,Variables - ✔✔Variables are like containers that hold data.
Why they're called variables: The value inside a variable can change, or "vary,"
as the program runs.
Ex: x = 5 (Here, x is a variable holding the value 5)
y = x + 3 (Now, y is a variable holding the value 8 because x was 5)
Algorithm - ✔✔An algorithm is a sequence of instructions that solves a problem.
Ex: Think of an algorithm as a step-by-step guide. For instance, a recipe for
baking a cake is an algorithm. It tells you what ingredients to use and the steps
to follow to bake the cake.
Flowchart - ✔✔a visual representation of the steps in a process or program. It
uses different shapes to represent different types of actions or steps.
Flowchart Symbols
Oval: Represents the start and end of the program.
Parallelogram: Represents input and output operations.
Rectangle: Represents processing steps (like calculations).
Arrow: Shows the direction of the flow of steps.
2|Page
©KERRYMARTIN 2025/2026. YEAR PUBLISHED 2025.
,Interpreter - ✔✔type of program that runs other programs by reading and
executing each statement one at a time.
How It Works: Reads the first instruction. Executes the instruction immediately.
Repeats the process for the next instruction until all are executed.
This process allows the program to perform its tasks step by step.
Input Statement - ✔✔a parallelogram represents an input and output
statement, written as: variable = Get next input.
The input statement assigns the indicated variable with the next program input
value.
Output Statement - ✔✔Parallelogram: Represents output statements.
Output Statement: Written as Put item to output.
Item: Can be a string literal or a variable.String
Literal: Text within double quotes, e.g., "Go #57!".
Character: Includes letters (a-z, A-Z), digits (0-9), or symbols (~, !, @, etc.).
3|Page
©KERRYMARTIN 2025/2026. YEAR PUBLISHED 2025.
, Cursor - ✔✔Indicates where the next output item will be placed.
Automatic Movement: The system moves the cursor to the next position after
each output item.
Newline - ✔✔A special two-character sequence \n.
Moves the cursor to the next output line when it appears in a string literal.
The newline is invisible in the output.
Ex: Put "Hello\nWorld!" to output will display:
Hello
World!
Comment - ✔✔Text added by a programmer to explain the code, ignored during
execution.
Coral Syntax: A comment starts with // and includes all subsequent text on that
line.
4|Page
©KERRYMARTIN 2025/2026. YEAR PUBLISHED 2025.