码迷,mamicode.com
首页 > 编程语言 > 详细

Learning Python from Codecademy

时间:2017-09-08 15:31:50      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:ima   line   pam   bool   not   min   ota   art   white   

---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

标签:ima   line   pam   bool   not   min   ota   art   white   

原文地址:http://www.cnblogs.com/dusanlang/p/7494783.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!