A function call passes a variable as an argument. It takes the place of the function’s parameter.
Write a function called square that takes a parameter named ‘t’, which is a turtle. It should use the turtle to draw a square. Write a function call that passes bob as an argument to square, and then run the program again. This looks like:
def square(t): for i in range(4): fd(t, 100) lt(t) square(bob)
Adding a parameter to a function is called generalization because it makes the function more general
An interface is like a contract between a function and a caller. The caller agrees to provide certain parameters and the function agrees to do certain work.
data structures are things like lists, dictionaries and tuples
compound data structures are combinations of data structures like lists of tuples, and dictionaries that contain tuples as keys and lists as values
Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in aformat that is both human-readable and machine-readable. Although the design of XML focuses on documents, it is widely used for the representation of arbitrary data structures, for example in web services.
MapReduce is a framework for processing parallelizable problems across huge datasets using a large number of computers (nodes), collectively referred to as a cluster (if all nodes are on the same local network and use similar hardware) or a grid (if the nodes are shared across geographically and administratively distributed systems, and use more heterogenous hardware). Computational processing can occur on data stored either in afilesystem (unstructured) or in a database (structured). MapReduce can take advantage of locality of data, processing data on or near the storage assets to decrease transmission of data.
- “Map” step: The master node takes the input, divides it into smaller sub-problems, and distributes them to worker nodes. A worker node may do this again in turn, leading to a multi-level tree structure. The worker node processes the smaller problem, and passes the answer back to its master node.
- “Reduce” step: The master node then collects the answers to all the sub-problems and combines them in some way to form the output – the answer to the problem it was originally trying to solve
Programming Language Types
Imperative – The focus is on what steps the computer should take rather than what the computer will do(ex. C, C++, Java).
Declarative – The focus is on what the computer should do rather than how it should do it (ex. SQL).
Functional – a subset of declarative languages that has heavy focus on recursion