为了账号安全,请及时绑定邮箱和手机立即绑定

初识Python

廖雪峰 移动开发工程师
难度入门
时长 5小时 0分
学习人数
综合评分9.43
3762人评价 查看评价
9.7 内容实用
9.4 简洁易懂
9.2 逻辑清晰

已采纳回答 / 这位童鞋很懒
可能是Python版本的原因,改成print ('hello world!')试试看,参考https://zhidao.baidu.com/question/1175043581404108379.html
L=zip((x for x in range(1,100,2)),(x+1 for x in range(1,100,2)))
print [m*n for m,n in L]
下面问notepad++是在哪下载的我真的醉了,再小白不会百度你去360都下得到。。。
print r'''"To be, or not to be": that is the question.
Whether it's nobler in the mind to suffer.''''
s = 'Python was started in 1989 by \"Guido\".\n Python is free and easy to learn.'
print s
for each_number in range(1,101)[6::7]:

print each_number
L = [75, 92, 59, 68]
sum = 0.0
for score in L:
sum+=score
print sum / 4

这样都过不去?
给大家一个zip方式
a=[1,2,3]
b=['a','c','d']
s=zip(a,b)
print s'''
楼上老多人都写错了 你要是用zip的话 应该是 zip(range(1,100,2),range(2,101,2))
int('123', 8)是八进制转化为十进制……
def toUppers(L):
return [x.upper() for x in L if isinstance(x,str)]

print toUppers(['Hello', 'world', 101])
def move(n, a, b, c):
if n==1:
print 'a-->c'
return
else:
move(n-1,a,c,b)
print 'a-->b'
move(n-1,b,a,c)
print 'a-->c'


move(4, 'A', 'B', 'C')我的代码
def move(n, a, b, c):
if n==1:
print 'a-->c'
return
else:
move(n-1,a,c,b)
print 'a-->b'
move(n-1,b,a,c)
print 'a-->c'


move(4, 'A', 'B', 'C')
我的心都睡了

已采纳回答 / 老司机俱乐部
不会呀,显示了,你按照答案输入一遍看看。
课程须知
如果您了解程序设计的基本概念,会简单使用命令行,了解中学数学函数的概念,那么对课程学习会有很大的帮助,让您学起来得心应手,快速进入Python世界。
老师告诉你能学到什么?
通过本课程的学习,您将学会搭建基本的Python开发环境,以函数为基础编写完整的Python代码,熟练掌握Python的基本数据类型以及list和dict的操作。

微信扫码,参与3人拼团

微信客服

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

帮助反馈 APP下载

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

公众号

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

友情提示:

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

本次提问将花费2个积分

你的积分不足,无法发表

为什么扣积分?

本次提问将花费2个积分

继续发表请点击 "确定"

为什么扣积分?

举报

0/150
提交
取消