为了账号安全,请及时绑定邮箱和手机立即绑定
age = 19
if age >= 18:
temp = 'adult {}'
print(temp.format(age))
# Enter a code
template = 'Life is {0}, {1} {2} {3}'
template1 = 'Life is {a},{b},{c} {d}'
print(template.format("short","you","need","python"))
aa='short'
bb = 'you'
cc = 'need'
dd = 'python'
print(template1.format(a=aa,b=bb,c=cc,d=dd))
print(r'''To be, or not to be: that is the question.Whether it's nobler in the mind to suffer.''')
print('Hello World')
最大的难度在于求表面积公式
Python遍历dict
通过直接print(d),我们打印出来的是完整的一个dict;有时候,我们需要把dict中m(满足)一定条件的元素打印出来
>>>print(my name is zilong xie)
L=[i*i for i in range(1,101)]
print(sum(L))
这个对吗
long=3.14,wieth=1.57
round(num,2)保留小数点后面两位数
print(‘hello world’)
def sub_sum(n):
if n <= 0:
return 0
return n+sub_sum(n-1)
n=100
print(sub_sum(n))
课程须知
如果您了解程序设计的基本概念,会简单使用命令行,了解中学数学函数的概念,那么对课程学习会有很大的帮助,让您学起来得心应手,快速进入Python世界。
老师告诉你能学到什么?
通过本课程的学习,您将学会搭建基本的Python开发环境,以函数为基础编写完整的Python代码,熟练掌握Python的基本数据类型以及list和dict的操作,灵活使用流程控制语句。

微信扫码,参与3人拼团

微信客服

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

帮助反馈 APP下载

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

公众号

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

友情提示:

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

本次提问将花费2个积分

你的积分不足,无法发表

为什么扣积分?

本次提问将花费2个积分

继续发表请点击 "确定"

为什么扣积分?

举报

0/150
提交
取消