Chap1启航 #36
Emperor449
started this conversation in
P2S 妙妙屋
Chap1启航
#36
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
今天学习了注释comment,单行注释使用#开头,全部只能写在一行中;多行注释使用三个引号(无论单双引号),“”=字符串string。
print=#output输出
回车或者\n(转义字符,换行)=换行
end=“”(不换行)
\t=缩进,相当于后面一个往后推
控制分隔的参数sep,
eg.print(“data”, “whale”)=data whale
print(“data”,“whale”,sep=“”)=datawhale
多行输出要用三对引号,无论单双引号
三种python常见的error:syntax error,runtime error(crash),logical error
INPUT输入
int整数,float小数,split默认分隔,eg.split(“,”)
库需要import导入,使用xx.yy来调用
#euler常数
#tau=2Π
#gcd最大公约数
Beta Was this translation helpful? Give feedback.
All reactions