[course] 02 —— Python基础
Python 基础
Print
print("hello world!")Comments and pond characters
# A comment, this is so you can read your program later. # Anything after the # is ignored by python.
print("I could have code like this.") # and the comment after is ignored
# You can also use a comment to "disable" or comment out code: # print("This won't run.")
print("This will run.")Numbers and Math
除法
The Modulus or Remainder Operator (%) 余数/模
浮点数计算相等
浮点数近似相等计算方式:
Importing Modules
Builtin Types 内置类型
Builtin Constants 内置常量
Builtin Operators 内置运算符
类型将会影响计算方式
Last updated