


















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
D278 WGU SCRIPTING AND PROGRAMMING FOUNDATIONS COMPREHENSIVE EXAM SCRIPT QUESTIONS AND SOLUTIONS 2026
Typology: Exams
1 / 26
This page cannot be seen from the preview
Don't miss anything!



















โ Computational thinking Answer: Creating a sequence of instructions to solve a problem (aka algorithm) โ Algorithm Answer: A sequence of instructions that solves a problem โ Flowchart Answer: A graphical language for creating or viewing computer programs โ Coral Code Language Answer: A language intended for learning to program Two versions: flowchart and code Looks like pseudocode, but follows rules that allow execution
โ Program Answer: A list of statements Each statement is carrying out some action and executing one at a time โ String literal Answer: consists of text (characters) within double quotes Ex: "Go #57!". โ Cursor Answer: Indicates where the next output item will be placed in the next output The system automatically moves the cursor after the previous output item โ Newline Answer: \n Special sequence who appearance in an output string literal causes the cursor to move to the next output line Exists visibly in the output
โ Byte Answer: 8 bits โ ASCII Answer: A popular code for characters โ Pseudocode Answer: Text that resembles a program in a real programming language but is simplified to aid human understanding. โ Variable Answer: A named item used to hold a value โ Assignment statement Answer: Assigns a variable with a value; and keeps that value during subsequent statement until X is assigned again. Assignment's left side must be a variable (ex. x=5) โ Variable declaration
Answer: Declares a new variable, specifying the variables name and type โ Integer variable type Answer: Can hold whole number values โ Expression Answer: A combination of items like variables, literals, operators, and parentheses that evaluate to a value Ex.) y=2*(x+1) โ Identifier Answer: A name created by a programmer for an item like a variable or function Must be a sequence of letters, underscores, and digits Must start with a letter Case sensitive โ Reserve word Answer: A word that is part of the language like: Integer, Get, or Put
Answer: The process of writing, compiling, and testing a small amount of code, then writing compiling and testing a small amount more, and so on. โ Floating-point number Answer: A real number; refers to decimal being able to appear anywhere (float) in the number โ Floating-point literal Answer: a number with a fractional part, even if that fraction is 0, as in 1.0, 0.0, or 99. โ Not a number Answer: Indicated an unrepresented or undefined value โ Function Answer: A list of statements executed by invoking the function's name โ Function call Answer: Invoking a function's name; causes the function's statements to execute
โ Arguements Answer: Any function input values, appear within ( ); separated by commas if more than one โ RandomNumber( ) Answer: Function build into Coral that takes two arguments, lowValue and highValue, and returns a random integer in between the given range of lowValue and highValue โ Type conversion Answer: A conversion of one data type to another, such as integer or float โ Implicit conversion Answer: Automatic conversion of one data type to another โ Type cast Answer: Converts a value of one type to another type โ Modulo Operator (%) Answer: Evaluates to the remainder of the division of two integer operands Ex.) 21 / 4 = 1
Answer: Each decision is independent, this more than one branch can execute โ Equality operator Answer: Checks whether two operands' values are the same (==) or different (!=) โ Boolean Answer: A type that has just two values : true or false โ Relational operator Answer: Checks how one operand's value relates to another (> , <, =, >=, <=) โ Logical operator Answer: treats operands as being true or false, and evaluates to true or false; includes: and, or, not Commonly used to detect if a value is within a range Ex.) x = 4 (x>1) and (x<9) true โ Precedence rules
Answer: The order in which operators are evaluated in an expression. โ If statement Answer: is an if decision expression followed by a sub-statement, without the "else" part โ Loop Answer: A program constructed that repeatedly executes the loops statement (loop body) while the loop expression is true When false, execution proceeds past the loop โ Iteration Answer: Each time through a loop's statement โ Infinite loop Answer: A loop that never stops iterating; accidental infinite loops are common โ Sentinel value Answer: A special value indicating the end of a list, such as a list of positive integers ending with ), as in 10 1 6 3 0
Answer: A loop that appears in the body of another loop (commonly referred to as inner and outer loop) โ Do-while loop Answer: Loop that first executes the loop body's statements, then checks the loop condition. Useful when the loop should iterate at least once โ Array Answer: A special variable having one name, but storing a list of data items with each item being directly accessible (also called a Vector) Must be an integer type, cannot be floating-point โ Element Answer: Each item in an array โ Index Answer: Each elements location number within an array (the number in backets) โ Swapping
Answer: Means to assign two variables with each others value (ex. x=3 y=7 swap x=7 y=3) A common method is to use a third variable ex. x=22 y= tempVal = x x=y y = tempVal x=99 y= โ Function definition Answer: Consists of the new function's name and a block of statements. The function's name can be any valid identifier โ Local variable Answer: AA variable declared in a function, which is then accessible only within that function โ Parameter Answer: A functions input specified in a function definition Ex. pizza area function might have diameter as a parameter
โ Algorithm efficiency Answer: typically measured by the algorithm's computational complexity โ Computational complexity Answer: The amount of resources used by the algorithm Most common resources considered are the runtime and memory usages โ Runtime complexity Answer: A function, T(N), that represents the number of constant time operations performed by the algorithm on an input of size N. โ Algorithm best case Answer: The scenario where the algorithm does the minimum possible number of operations โ Algorithm worst case Answer: The scenario where the algorithm does the maximum possible number of operations
Input data size must remain a variable. โ Space complexity Answer: a function, S(N), that represents the number of fixed-size memory units used by the algorithm for an input of size N. โ Auxillary Space Complexity Answer: The space complexity not including the input data Ex.) S(N) = k โ Linear search Answer: a search algorithm that starts from the beginning of a list, and checks each element until the search key is found or the end of the list is reached โ Runtime Answer: the time the algorithm takes to execute โ Binary search Answer: a search algorithm that starts at the middle of a sorted set of numbers and removes half of the data; this process repeats until the desired value is found or all elements have been eliminated.
โ Design phase Answer: Part of SDLC Defines specifics of how to build a program โ Implementation phase Answer: Part of SDLC Involves writing the program โ Testing phase Answer: Part of SDLC Checks that the program correctly meets the goals โ Waterfall approach Answer: Carrying out the SDLC phases in sequence. โ Agile approach Answer: Building program by doing small amounts of SDLC phases in sequences and then repeating Also called spiral approach โ Object
Answer: A grouping of data (variables) and operations that can be performed on that data (functions) โ Abstraction Answer: To have a user interact with an item at a high-level, with lower-level internal details hidden from the user/ Also called information hiding or encapsulation โ Abstract data type (ADT) Answer: a data type whose creation and update are constrained to specific well-defined operations A class can be used to implement an ADT โ Universal modeling language Answer: A modeling language for software design that uses different types of diagrams to visualize the structure and behavior of programs Consists of several structural and behavioral diagrams โ Structural diagram