Book imformation: <pratical programming:an Introduction to Computer science Using Python 3> 2nd edtion
Author:paul Gries,jennifer Campbell,jason Montojo
Page:chapter 1 and Chapter 2.1-2.2
1.every Computer runs operating System,which It's the only program on the computer that's allowed direct access to the hardware (Hardware).
or more complicate (add another layer between the programmer and the hardware):
2.two ways to use the Python interpreter (interpreter) :
(1). Execute a saved Python program with. PY extension (extension, suffix)
(2). Using a Python shell (Shell, command parser )
3.the >>> symbol is called a prompt (hint), prompting to type something
4.the result of Interger division have a decimal point even is a whole number:
1 >>> 5/22 2.53 >>> 4/24 2.0
5.when the operands (operand) is int and Float,python automatically convert the int into a float:
1 >>> 17.0-102 7.03 >>> 17-10.04 7.0
And you can omit the zero like ' 17. ' (But most people think it's a bad idea)
6.integer Division,modulo (modulo)
1 2 23 >>>4 5
: Divisible
When the operands is negative or float,it takes the floor (rounding down) of the result.
1 2 -23 >>>//4 1
1 >>> 3.5//1.02 3.03 >>> 3//1.14 2.05 >>> 3.3 16 3.0
When using modulo,the sign of the result matches the divisor (divisor)
Definition: a% B = a-n*b,n is an integer that does not exceed A/b
1 >>> -17 of2 33 >>> -10% + 4 -3
7.exponentiation (Take power): * *
1 >>> 2 * * 32 83 >>> 3 * 34 27
8.binary operators (binocular operator), unary operators (monocular operator)
+ 、-、 *,/:binary operators
-(nagetive): Unary operators
1 >>>-52 -53 >>>--54 55 >>>---56 -5
Note 1 for <pratical Programming:an Introduction to Computer science Using Python 3>