code "print ()", then exeut
double quotes equal to single quotes
() is used to specify precedence in formula rather than []
For example, ((1+r)*n-1) can be executed, but [(1+r)*n-1] can not be executed.
[] have other function, like range\[1:50\]
*
can not be omitted in formulaTake an example:
when we exercise the mortgage calculator: A=P*r*(1+r)
is different from A=Pr\(1+r\)
, the latter one can not be executed.
Bracket is a function quote (e.g print () ); quotation mark is used to quote the string
p = 1
print(P)
You will see the error message NameError: name 'P' is not defined
. That is because Python is case-sensitive. The lowercase p
and uppercase P
mean different variables.
For i in range(1,10):
print (i)
You will see the outcome: 1,2,3,4,5,6,7,8,9 without 10, because the left range is included, while the right range is excluded.
//TODO: study the following pointers and add comments
这个不错,一一对应,清楚明白。 https://carolhsu.gitbooks.io/django-girls-tutorial-traditional-chiness/content/intro_to_command_line/README.html 不过这篇有一个地方补充一下: Windows进入command line的方法是: 开始菜单 — 在搜索栏打入“cmd” 。 (这篇是台湾的系统吧, 什么“命令提示字元”.[Dizzy].)