为了账号安全,请及时绑定邮箱和手机立即绑定
num = 1
sum = 1
while num <= 10:
sum *= num
num += 1
print(sum)
L = [75, 92, 59, 68, 99]
sum = 0;
for num in L:
sum += num;
print(sum/(len(L)))
print('special string: \', \", \\, \\\, \\n, \\t')
print(round(3.14*1.57,2))

最新回答 / wuzhou
改成 if not s1.isdisjoint(s2):set提供isdisjoint()方法,可以快速判断两个集合是否有重合,如果有重合,返回False,否则返回True
哇!好厉害!
好简单 聪明的我都学会了
我真聪明,呵呵呵呵呵呵
age = 4
if age >= 18 :
print('adult')
elif age >= 6 :
print('tennager')
elif age >= 3 :
print('kid')
else :
print('baby')
template = 'Life is {x},you need {y}'
x='short'
y='Python'
result=template.format(x = x,y = y)
print(result)

template = 'Life is {1},you need {0}'
result1 = template.format('Python','short')
print(result1)
print(r''' "To be, or not to be": that is the question.
Whether it's nobler in the mind to suffer.''')
s = 0
a = 0
while True:
if s >= 1000:
break
s = s + 2
a = a + s
print(a)
更简单
课程须知
如果您了解程序设计的基本概念,会简单使用命令行,了解中学数学函数的概念,那么对课程学习会有很大的帮助,让您学起来得心应手,快速进入Python世界。
老师告诉你能学到什么?
通过本课程的学习,您将学会搭建基本的Python开发环境,以函数为基础编写完整的Python代码,熟练掌握Python的基本数据类型以及list和dict的操作,灵活使用流程控制语句。

微信扫码,参与3人拼团

微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号

友情提示:

您好,此课程属于迁移课程,您已购买该课程,无需重复购买,感谢您对慕课网的支持!

本次提问将花费2个积分

你的积分不足,无法发表

为什么扣积分?

本次提问将花费2个积分

继续发表请点击 "确定"

为什么扣积分?

举报

0/150
提交
取消