学习笔记
文章平均质量分 65
悦真
这个作者很懒,什么都没留下…
展开
-
learn Python the hard way EX0
考虑到大多数第一次学习编程的人都和我一样用的是windows操作系统,在这里只讨论windows下的环境搭建。 下载notepad++ windows powershell 系统自带 首先进入python,在powershell里输入python。 如果没有出现书中正确的结果,按照书中的配置python路径: #path;后面是你的python安装路径 [Environment]原创 2017-08-02 12:13:35 · 241 阅读 · 0 评论 -
learn Python the hard way EX1
notepad++输入如下,另存到a下 print "hello world!" print "hello again" print "I like typing this." print "This is fun." print 'Yay! Printing.' #print "I'd much rather you 'not'." print 'I "said" do not t原创 2017-08-02 12:23:21 · 172 阅读 · 0 评论 -
learn python the hard way EX2
注释代码 # # 技巧:从后往前阅读代码,方便捕获错误。原创 2017-08-02 12:40:26 · 182 阅读 · 0 评论 -
learn python the hard way EX3
powershell: cd a python ex3 notepad++ #count chickens print "I will now count my chickens:" #hens' sums print "hens",25+30/6 #roosters' sums print "roosters",100-25*3%4 #count eggs prin原创 2017-08-02 12:43:43 · 226 阅读 · 0 评论 -
learn python the hard way EX4
cars = 100 space_in_a_car = 4.0 drivers = 30 passagers = 90 cars_not_driven = cars - drivers cars_drivern = drivers carpool_capacity = cars_drivern * space_in_a_car average_passengers_per_car原创 2017-08-02 13:18:47 · 306 阅读 · 0 评论