Computing Module - Final Exam Flashcards
Arguments
Pieces of data that are sent to a function, which the function uses in calculations or other operations
Parameter Variables
Represent the inputs to the function, and are assigned the value of the arguments
Value-Returning Functions
Returns a value back to the part of the program that called it, used when the function should explicitly return a value. If a function contains NO return statement, None is automatically returned.
Lists
A collection variable that has an ordered sequence of elements, each element inside the list is called an item.
A list can hold multiple types of data
Count-Controlled Loops
A loop that iterates a specific number of times, and is written using a “for” statement. The for statement executes once for each item in the sequence.
Condition-Controlled Loops
A loop that will iterate as long as a condition is true, and is written using a “while” statement. The statement(s) under while loop iterate as long as the condition is true.
If statements
One way selection instruments, prevents an action from being performed if a condition is not right
If-else statements
Two-Way selection instruments, makes a choice between two alternative courses of action
If-elif-else statements
Multi-Way selection instruments, consider each condition until one evaluates to true or they all evaluate to false
Nested Decision Structures
Allow for consecutive decisions to be made, and a condition inside will only evaluate if the first condition evaluates to True
Nested Repetition Structures
A loop inside a loop, an inner loop goes through all of its iterations for one iteration of the outer loop
Preventing Software Bugs
Object oriented programming can improve the structure of large software systems, and software testing techniques can be developed and promoted
Black Box Software Testing
testing code without considering how it works, e.g we check to see if a given input produces desired output
White Box Software Testing
testing code knowing how coed is supposed to work, e.g. we check to see if each condition of an if statement will work when expected
Integration Software Testing
testing different sections of code working together; lets us test communication between different sections of code
Unit Software Testing
testing a specific section of code, e.g testing a single function