Shared Flashcard Set

Details

Lecture 1 - Lecture 11
Definitions for Final
48
Computer Science
Undergraduate 2
11/05/2013

Additional Computer Science Flashcards

 


 

Cards

Term
Computational thinking
Definition
involves solving problems, designing systems, and understanding human behavior by drawing on the concepts fundamental to computer science.
Term
Connecting computing
Definition
Understanding how computing connects people and helps us to solve meaningful problems.
Term
Developing computational artifacts
Definition
Designing and implementing artifacts with a practical, personal, or societal intent.
Term
Abstracting
Definition
Identifying a computational problem to be solved; representing data, information, and knowledge for computational use.
Term
Analyzing problems and artifacts
Definition
Evaluating and justifying the quality of solutions, locating and correcting errors.
Term
Abstraction
Definition
reduces information to focus on relevant concepts.
Term
Levels of abstraction used in computation:
Definition
layers of computing hardware (gates, chips, components), programming languages (low to high level), and levels of hardware, software, and conceptual abstractions.
Term
Algorithm
Definition
A precise sequence of instructions for a process that can be executed by a computer (sequence, selection, iteration).
Term
Programming
Definition
enables problem solving, expression, and knowledge creation. Programs are written to execute algorithms.
Term
Syntax
Definition
sentence structure, the way in which words are put together to form sentences, it provides a set of rules.
Term
Semantics
Definition
the study of the meaning of signs, symbols
Term
Compile time errors
Definition
syntactical errors made which prevent the program from successful compilation.
Term
Clean compile
Definition
the result of compiling a syntactically correct program with no compile time errors.
Term
Execution results
Definition
the behavior of the program when it actually executes on the computer.
Term
Operator precedence order
Definition
* / &
+ -
< <= > >=
== !=
&&
||

PEMDAS Rules
Term
Selection example
Definition
if/then statements
Term
Iteration examples
Definition
for loop, while loop
Term
Counted loops
Definition
used when the number of iterations is known or can be computed or input.
Term
Sentinel loops
Definition
when a certain input causes the loop to stop.
Term
Indefinite loops
Definition
when the exact number of iterations cannot be predicted by examining the code.
Term
Augmented operators
Definition
sum += 10
sum -= 10
sum *= 10
sum /= 10
sum %= 10
Term
Built-in functions
Definition
are provided as a part of Python - raw_input, float, int, etc.
Term
Parameter
Definition
used in the function definition.
Term
Argument
Definition
used in the function invocation.
Term
Return function
Definition
makes a variable visible outside of its block of code.
Term
A function
Definition
a computation that returns a value or values, according to its type.
Term
What do you need in order to use a built-in function?
Definition
Its name, the type of value it returns, and whether it requires any information from you.
Term
Local variables
Definition
are visible in the code from the point where they are declared until the end of that block of code. They are non-persistent.
Term
Default argument
Definition
an argument that stands in when a value is not given in the function invocation for that particular argument.

[ def printSon(name, age = 8) ]
Term
Function invocation
Definition
A user defined function can be invoked by other functions. This is also the case for built-in functions that are available in a library.
Term
List
Definition
a datatype that is written as a list of comma-separated items between [square brackets.] Any type of data can be in a list and a list can have multiple types of data at once.

["Math", "CS", 280, 380]
Term
Index
Definition
a value's position in a list - STARTS AT ZERO.
Term
Break statement
Definition
terminates a current loop/selection and resumes execution at the next statement.
Term
Fibonacci sequence code
Definition
def fibo(par):
____result = []
____var1 = 0
____var2 = 1
____while var2 < par:
________result = result + [var2]
________var3 = var1 + var2
________var1 = var2
________var2 = var3
____return result
Term
Tuple
Definition
a sequence of Python objects like lists; the only differences are that tuples can't be changes and they use parentheses (instead of lists' square brackets).
Term
Bubble sort
Definition
moves from the front to the end of the list, "bubbling" the largest value to the end of the list using pair-wise comparisons and swapping.
Term
Pseudocode for Bubble Sort
Definition
def bubblesort(sortlist):
____for j in range(len(sortlist)-1):
________for i in range(len(sortlist)-1-j):
____________if sortlist[i+1] < sortlist[i]:
________________swap = sortlist[i]
________________sortlist[i] = sortlist[i+1]
________________sortlist[i+1] = swap
Term
Recursion
Definition
an algorithmic technique where a function, in order to accomplish a task, calls itself with some part of the task.
Term
Base case
Definition
where the problem is simple enough to be solved directly
Term
Recursive case
Definition
divides the problem into one or more simpler/smaller parts, invokes the function on each part, and combines the solutions of the parts into a solution for the problem
Term
iterativeSum
Definition
def iterativeSum(parList):
____result = 0
____for x in parList:
________result += x
____return result
Term
recursiveSum
Definition
def recursiveSum(parList):
____if parList == []
________resultSum = 0
________return resultSum
____else:
________resultSum = parList[0] + recursiveSum(parList[1:])
________return resultSum
Term
iterativeFactorial
Definition
def iterativeFactorial(n):
____result = 1
____for i in range (n):
________result *= (i + 1)
____return result
Term
recursiveFactorial
Definition
def recursiveFactorial(n):
____if integer == 0:
________result = 1
________return result
____else:
________result = integer * recursiveFactorial(n - 1)
________return result
Term
iterativeDecrement
Definition
def iterativeDecrement(n):
____while n > 0:
________print number
________number -= 1
____print "Great!"
Term
recursiveDecrement
Definition
def recursiveDecrement(n):
____if integer >= 1:
________print integer
________recursiveDecrement(n - 1)
____else:
________print "Great!"
Term
multipleIterative
Definition
def multipleIterative(n):
____for i in range(1, n + 1):
________multiples = 5 * i
________print multiples
Term
multipleRecursive
Definition
def multipleRecursive(n):
____if n == 1:
________result = 5
________return result
____else:
________result = 5 + multipleRecursive(number - 1)
________return result
Supporting users have an ad free experience!