2014.08. 22
For information about the latest releases and related tools,the python.org website is a cornucopia.
Windows Installation:python x.x or ActivePython
Python is an interpretative, object-oriented, high-level programming language with dynamic semantics.
Liunx, enter python to start the interactive python interpreter,ctrl-d exit the interactive interpreter;
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/47/20/wKioL1P3AGmBxNakAAS8vwBjCTY975.jpg "style=" float: none; "title=" 1.png "alt=" Wkiol1p3agmbxnakaas8vwbjcty975.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/47/1F/wKiom1P2_1HxpOKXAAaf4OoRMC4074.jpg "style=" float: none; "title=" 2.png "alt=" Wkiom1p2_1hxpokxaaaf4oormc4074.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/47/20/wKioL1P3AGmCMZ7JAAQL4kT229w116.jpg "style=" float: none; "title=" 3.png "alt=" Wkiol1p3agmcmz7jaaql4kt229w116.jpg "/>
1.The Python line is a row , not like other computer languages, each line to the end of a good.
2. if one of the two numbers participating in the division is a floating-point number, the result is also a float:
>>>1/2.0
0.5
If you want python to perform only normal division, you can precede the program with
>>>from __future__ Import Division
>>>1/2
0.5
Alternatively, you can use the command switch -qnew.
Python also provides another operator to achieve the division of the integer ------ double Slash
>>>1//2
0
3. The remainder of the x%y operator ------- The result of x divided by y
4. Power operator
>>>2**3
8
The power operator has a higher precedence than the inverse (unary minus operator), so -3**2 is equivalent to-(3**2)
5. A variable is a name that represents or refers to a value. Variable names can contain letters, numbers, and underscores (_). A variable cannot begin with a number.
6. in python3.0 ,print is a function that requires writing printinstead of print 42.
general definition of statement attributes: they change things. For example, the assignment statement changes the variable, andthe print statement changes the contents of the screen display.
7. Input function
>>>x=input ("x:")
X:32
>>>y=input ("Y:")
Y:32
>>>print X*y
1024
The statement following the Python prompt (>>>) can be counted as part of a complete program.
Python Learning Notes