-
print()中增加end=""参数表示输出后不增加换行,多个print()可以连续输出
查看全部 -
输入字符串转换为数字时使用eval()函数
查看全部 -
Python解释器在做布尔逻辑运算时,主要能提前确定计算结果,就不会往后继续计算,直接返回结果
查看全部 -
Python将0,空字符串和None看成False, 其它非空数值和非空字符串看成True;
查看全部 -
一个长方形的长为3.14cm,宽为1.57cm,请计算这个长方形的面积,保留小数点后两位。
length=3.14
width=1.57
result=round(length*width,2)
print(result)
查看全部 -
3.1415926 浮点数
‘Learn python in imooc.' 字符串
100 整型
0b1101 十六进制
查看全部 -



{}.farmat()
查看全部 -
a=3.14 b=1.57 s=a*b print(s) round(s,2)查看全部
-
print("hello world") hello world a=hello b=world print(a+' '+b) hello world查看全部
-
cmd >python >>>print("Xiu")查看全部
-
python X=3.14 Y=3.3 S=XxY print (round(s,2))查看全部
-
python X=3.14 Y=3.3 S=XxY P print(round(s,2))查看全部
-
set和list类似,拥有一系列元素,但是set和list不一样,set里面的元素是不允许重复的,而list里面可以包含相同的元素;set与list的另一个区别是,set里面的元素是没有顺序的。
查看全部 -
Python X=3.14 Y=60 S=XxY print(round (s,2))查看全部
-
python hollow等于,hollow, print python world 等于,world , print查看全部
举报
0/150
提交
取消