D278 WGU. SCRIPTING & PROGRAMMING FOUNDATIONS FINAL EXAM
input
program gets data. file, keyboard
process
program performs computations on data
output
program puts that data somewhere
variables
named item such as x or numPeople to hold a value
programming
problem solving
coral
super simple programming language
integer
whole number
string
A sequence of characters
boolean
true or false
obtaining values
1. manually assign 2. assign through input box
array
collection of particular data type (names=string, quantity=integer, price=float, etc.),
each entry known as an element
Array characteristics
, always starts at 0, static data structure, must be declared before use
equality operators
Operators == (is equal to) and != (is not equal to) that compare two values.
relational operators
==, !=, >, <, >=, <=
logical operators
and, or, not
branches
sequence of statements only executed under a certain condition
loop
program that repeatedly executes statements
iteration
each time the loop runs
white loop
A loop that continues to repeat while a condition is true.
Ex; While it's raining, grab an umbrella.
used when unsure of how many times loop will run
do-while loop
Iterate while the condition is true, tells you to something first, action before evaluation
EX: do {
... this thing
} while(condition);
for loop
Loops that have a predetermined beginning, end, and increment (step interval). used when you
already know how many times to repeat.
algorithm
sequence of instructions that solves a problem
flowchart
input
program gets data. file, keyboard
process
program performs computations on data
output
program puts that data somewhere
variables
named item such as x or numPeople to hold a value
programming
problem solving
coral
super simple programming language
integer
whole number
string
A sequence of characters
boolean
true or false
obtaining values
1. manually assign 2. assign through input box
array
collection of particular data type (names=string, quantity=integer, price=float, etc.),
each entry known as an element
Array characteristics
, always starts at 0, static data structure, must be declared before use
equality operators
Operators == (is equal to) and != (is not equal to) that compare two values.
relational operators
==, !=, >, <, >=, <=
logical operators
and, or, not
branches
sequence of statements only executed under a certain condition
loop
program that repeatedly executes statements
iteration
each time the loop runs
white loop
A loop that continues to repeat while a condition is true.
Ex; While it's raining, grab an umbrella.
used when unsure of how many times loop will run
do-while loop
Iterate while the condition is true, tells you to something first, action before evaluation
EX: do {
... this thing
} while(condition);
for loop
Loops that have a predetermined beginning, end, and increment (step interval). used when you
already know how many times to repeat.
algorithm
sequence of instructions that solves a problem
flowchart