Where do you use Python?
-Applications: Internet, enterprise, image, mobile, office-3D CAD/CAM-Personal information managers
Python is a great choice for
-Web and Internet development -Scientific and numeric computing-Education -Desktop GUIs-Software Development -Business applications
PCEP familiriazes with
data types, containers, functions, conditions, and loops
Importance of programs in a computer
A program makes a computer usable. Without a program, a computer, even the most powerful one, is nothing more than an object
computer is not aware of such things as
distance, speed, or time
actions that form a program
-accept a number representing the distance;-accept a number representing the travel time;-divide the former value by the latter and store the result in the memory;-display the result (representing the average speed) in a readable format.
Computers own language> ONLY developed by humans (yet!)
Instruction List (IL)
complete set of well-known commands
human languages that developed naturally.
What makes a language?
A program written in a high-level programming language is called
file containing the source code is called the
act of composing the selected programming language's elements in the order that will cause the desired effect.
There are two different ways of transforming a program from a high-level programming language into machine language:
Compilation and interpretation
the source program is translated once by getting a file (ie .exe and run under windows) containing the machine code; now you can distribute the file worldwide; the program that performs this translation is called a compiler or translator
you (or any user of the code) can translate the source program each time it has to be run; the program performing this kind of transformation is called an interpreter, as it interprets the code every time it is intended to be executed; it also means that you cannot just distribute the source code as-is, because the end-user also needs the interpreter to execute it.
actually a piece of text, so the source code is usually placed in text files.
-the execution of the translated code is usually faster;-only the user has to have the compiler - the end-user may use the code without it;-the translated code is stored using machine language - as it is very hard to understand it, your own inventions and programming tricks are likely to remain your secret.
-the compilation itself may be a very time-consuming process - you may not be able to run your code immediately after making an amendment;-you have to have as many compilers as hardware platforms you want your code to be run on.
-you can run the code as soon as you complete it - there are no additional phases of translation;-the code is stored using programming language, not machine language - this means that it can be run on computers using different machine languages; you don't compile your code separately for each different architecture.
-don't expect interpretation to ramp up your code to high speed - your code will share the computer's power with the interpreter, so it can't be really fast;-both you and the end user have to have the interpreter to run your code.
inherits all the described advantages and disadvantages
languages designed to be utilized in the interpretation manner are often called
source programs encoded using them are called
Guido van Rossum
-Pearl: scripting language by Larry Wall -Ruby: scripting language by Yukihiro Matsumoto
There is more than 1 python
Python 2: older and OG version of pythonPython 3: newer and most precise version of the languagenon-comptabile with each other!
Different python versions
-Cython -Jython ("J" is for java)-PyPy-RPython (restricted python)
open source operating system (ie. windows)
Integrated Development and Learning Environment.