


















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
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 Cannot use as an identifier
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