(WGU) | Complete Exam Concepts, Flowcharts & Definitions|
Rationales Graded A+ Latest Updated 2026
Basic instruction types are:
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.
Programs use variables to refer to data,
like x, y, and z below. The name is due to a variable's value "varying" as a program assigns a
variable like x with new values.
A basic computer program.
1) A basic computer program's instructions get input, process, and put output. This program
first assigns x with what is typed on the keyboard input, in this case 2.
2) The program's next instruction gets the next input, in this case 5.
3) The program then does some processing, in this case assigning z with x + y (so 2 + 5 yields 7).
4) Finally, the program puts z (7) to output, in this case to a screen
algorithm.
A sequence of instructions that solves a problem
A flowchart
is a graphical language for creating or viewing computer programs. Numerous flowchart
languages exist.
A program
is a list of statements, each statement carrying out some action and executing one at a time. OR
A sequence of statements
For Coral, an interpreter
runs a program's statements.
Run and execute
are words for carrying out a program's statements
,Statement
A specific action in a program.
A first program.
1) This program declares two integer "variables" for holding values, named wage and salary.
2) A program's execution begins from the Start node. The first statement assigns wage with 20.
3) Execution proceeds to the next statement, which gets wage's value, and multiplies by 40 and
52 to yield 41600. The statement assigns salary with that 41600.
4) The next statement puts text "Salary is" to output. The last statement puts variable salary's
value, which is 41600, to output. Execution ends when "End" is reached.
Variable
A name that can hold a value.
Run
The act of carrying out each statement's action.
Interpreter
A tool that runs a program's statements.
Programming terms.
Getting input
1) A parallelogram represents an input (or output) statement.
2) The statement assigns the variable on the left (wage) with the next value in the program's
input (20).
3) This program uses that gotten value in a subsequent calculation.
Basic input
Basic input example: Dog years to human years.
In a Coral flowchart,
a parallelogram represents an output statement, written as: Put item to output.
string literal
consists of text (characters) within double quotes, as in "Go #57!".
character
includes any letter (a-z, A-Z), digit (0-9), or symbol (~, !, @, etc.).
,cursor
indicates where the next output item will be placed in the output. The system automatically
moves the cursor after the previously-output item.
newline
is a special two-character sequence \n whose appearance in an output string literal causes the
cursor to move to the next output line. The newline exists invisibly in the output.
Outputting string literals.
1) This program puts "Keep calm" at the current cursor location in output, which initially is the
beginning of the output device. The cursor automatically goes to the text's end.
2) A \n in a string literal is a special two-character sequence that outputs a 'newline' character,
which is invisible but moves the cursor to the start of the next line.
3) The next output statement starts at the cursor's current location, which is now the second
line
comment
is text a programmer adds to a program, to be read by humans to better understand the code,
but ignored by the program when executing. In Coral, a comment starts with // and includes all
the subsequent text on that line. The comment must be on its own line.
Comments are for humans, and ignored during execution.
1) A comment begins with //. Programmers use comments to describe intent to another human
reading the program.
2) During execution, the comments are entirely ignored.
Valid and invalid comments
Whitespace
refers to blank spaces (space and tab characters) between items within a statement, and to
newlines. Whitespace helps improve readability for humans, but for execution purposes much
whitespace is ignored.
Computing history
An embedded computer
is a computer inside another device. Typically, these devices have a dedicated function such as a
coffee maker or washing machine
, The number of embedded computers are greater than the number of desktops and laptop
computers.
In 2012, there were 350 million desktops and laptops, compared to 17 billion embedded
computers shipped.
Bit and Byte
A single 0 or 1 is called a bit. 1011 is four bits. Eight bits, like 11000101, are called a byte.
ASCII bit codes for common characters (ignore Dec for now).
Characters and numbers are encoded and stored in the computer's memory
1) Each character has a unique bit code.
2) Words are stored as a sequence of bit codes in the computer's memory.
3) Symbols and spaces are also characters, and stored in the memory as bit codes.
4) Numbers are stored in binary. 12 is 0001100 in binary
Learning programming tends to aid in precise, logical thought, aspects of computational
thinking
1) Common English usage may be vague. Are workers, painters, and contractors the same
people or different? What exactly is white and brown?
2) Programs use one word per item; no synonyms, no pronouns. In English, using "painters"
consistently, and replacing "they" with "The IDs", yields precise info.
3) Policies and other documents often aren't logical, with conflicting or missing info. How can a
person 20 miles away take a taxi if they must drive? What about 100 miles?
4) Programmers use precise structures like "If-else" statements. When used in English, the result
is logical, unambiguous info. Some call this "computational thinking".
Computational thinking.
Programming is all about precision
Programming is all about precision. Programs must be created precisely to run correctly. Ex:
1) = and == have different meanings.
2) Using i where j was meant can yield a hard-to-find bug.
3) Declaring a variable as int when char was needed can cause confusing errors.
4) Not considering that n could be 0 in sum/n can cause a program to fail entirely in rare but not
insignificant cases.
5) The difference between typing x/2 vs. x/2.0 can have huge impacts.