Está en la página 1de 2

MIT OCW | PYTHON PROGRAMMING

TEXTBOOK NOTES
Declarative knowledge (or descriptive or propositional knowledge). Composed of statements of fact. It is the type of knowledge that is, by its very nature, expressed in declarative sentences or indicative propositions. Imperative knowledge (or procedural knowledge). It is knowledge about how to accomplish something; or knowledge exercised in the performance of some task. Control Unit. Directs the flow of data between the Central Processing Unit (CPU) and other devices. All computer resources are managed by the CU. It directs the operation of the other units by providing timing and control signals. Arithmetic Logic Unit (ALU). A digital circuit that performs integer arithmetic and logical operations. The ALU is a fundamental building block of the CPU. Compilation. The translation of source code into object code by a compiler. Source code. A collection of program instructions, written in a human-readable programming langauge, that must be translated by a compiler, interpreter, or assembler into object code before execution. Object code. It is what a compiler produces. In a general sense object code is a sequence of statements or instructions in a machine code langauge (in terms of 1s and 0s). In order to be used, object code must either be placed in an executable file, a library file, or an object file. Interpreter. Executes the source code directly. IDLE. The Integrated Programming Environment (IDE) for Python. IDE. Software application that provides comprehensive facilities to computer programmers for sofware development. It comes with multi-window text editor with syntax highlighting, autocompletion, smart indent and other; Python Shell with syntax highlighting; and integrated debugger. Object. Everything is Python has to do with objects. Each object has type. Overloaded Operators have a meaning that depends upon the types of operands.
http://www.functionx.com/cpp/Lesson25.htm

Algorithm. A finite list of instructions that describe a computation that when executed on a provided set of inputs will proceed through a set of well-defined states and eventually produce an output. There were fixed-program computers. A calculator was a four-function fixedprogram computer. Turing Completeness. A programming language is said to be Turing Complete if it can simulate a universal Turing Machine. Halting problem. Turing showed that it is impossible to write a program that given an arbitrary program, call it P, prints true if and only if P will run forever. All modern programming languages are Turing Complete. C is a good language for writing the programs that control data networks. PHP is a good language for building web sites. Python is a good general-purpose language. Syntax. Defines which strings of characters and symbols are well formed.

Static semantics. Defines which synctactically valid strings have a meaning. Semantics. Associates a meaning with each synctactically correct string of symbols that has no static semantic errors. A Python program is called a script. A command is often called a statement. Objects are the core things that Python programs manipulate. Every object has a type that defines the kinds of things that programs can do with objects of that type. Type are either scalar or non-scalar. Scalar objects are indivisible. Think of them as the atoms of the language. Non-scalar objects, for example strings, have internal structure. Python has four types of scalar objects: int is used to represent integers. Literals of type int are written in the obvious way, e.g. 3 or 10002 or -4. float is used to represent real numbers. Its called float because such values are stored in the computer as floating point numbers. This representation of real numbers has many advantages. However, under some situations it causes floating point arithmetic to behave in ways that are slightly different from real arithmetic. bool is used to represent the Boolean values true and false. None is a type with a single value. We will say more about this when we get to variables. == is an operator used to test whether two expressions are equal. != is an operator used to test if two expressions are unequal. Shell is the interpreter for Python.

También podría gustarte