'''
python 3.6
" / " 表示 浮点数除法,返回浮点结果;
" // " 表示整数除法
'''
a=7
b=2
c=a//b
print(c)
d = float(a)/float(b)
print(d)
e = float(a)//float(b)
print(e)
输出结果
3
3.5
3.0
博客展示了Python的输出结果,包含数字3、3.5和3.0,体现了Python在数据输出方面的应用。
'''
python 3.6
" / " 表示 浮点数除法,返回浮点结果;
" // " 表示整数除法
'''
a=7
b=2
c=a//b
print(c)
d = float(a)/float(b)
print(d)
e = float(a)//float(b)
print(e)
输出结果
3
3.5
3.0
3546

被折叠的 条评论
为什么被折叠?