Exercise 1、2、3

python ex1.py

Exercise 1、2、3Exercise 1、2、3

1、不像C后面要加;号。

2、单、双引号效果一样。

3、单引号里面的双引号可以被打印(反过来亦可)。

SyntaxError: grammar error



pound character、octothorpe、hash : #(comment)

python ex2.py

Exercise 1、2、3Exercise 1、2、3



python ex3.py

Exercise 1、2、3Exercise 1、2、3

1、print里可以直接数值运算,不加引号。

2、print里比较的式子会根据是否正确,最终打印True or False。

3、%(percent)求余。

4、在powershell里进入python,可以直接进行数学运算。

5、order of operations(Parentheses,Exponents,Multiplication,Division,Addition,Subtraction)

                                     (       括号,          指数,              乘,               除,          加,            减         )

                                      PE(M&D)(A&S)(美标)