1. 程式人生 > >Learning Python from Codecademy

Learning Python from Codecademy

pytho com star you min .... each boolean div

---syntax---

1. booleans: True and False

2. assin and reassign value to variable: spam =3

3. whitespace: indent(indentation) two blank spaces of four blank spaces

4. interpreter(interpretation): run your code line by line, and check for any errors

5. single line comment: use the # sign

6. multi-line comment: starting each line with #, or use a set of triple quotation marks""".........."""

7. exponent(exponentiation): use **, like this 10**2

8. modulo: get the reminder from division, when you use decimal, you should set like this 15.0/100 not 15/100

Learning Python from Codecademy