自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Matrix_Wall

我拿着把旧钥匙,敲着厚厚的墙

  • 博客(9)
  • 收藏
  • 关注

翻译 Learn Python The Hard Way-Ecercise36~40

Exercise36:设计和调试 Exercise37:复习各种符号 Exercise38:列表的操作 ten_things = "Apples Oranges Crows Telephone Light Sugar" print "Wait there's not 10 things in that list, let's fix that." stuff

2014-01-25 21:23:42 762

翻译 Learn Python The Hard Way-Ecercise31~35

Exercise31:作出决定 print "You enter a dark room with two doors. Do you go through door #1 or door #2?" door = raw_input("> ") if door == "1": print "There's a giant bear here eating a cheese cak

2014-01-25 15:30:46 1005

翻译 Learn Python The Hard Way-Ecercise26~30

Exercise26:恭喜你,你现在可以考试了! def break_words(stuff): """This function will break up words for us.""" words = stuff.split(' ') return words def sort_words(words): """Sorts the words."

2014-01-25 15:14:03 1069

翻译 Learn Python The Hard Way-Ecercise21~25

Exercise21:函数可以返回东西 def add(a, b): #定义四则运算的函数 print "ADDING %d + %d" % (a, b) return a + b def subtract(a, b): print "SUBTRACTING %d - %d" % (a, b) return a - b def multiply(a, b): print "

2014-01-25 14:58:10 955

翻译 Learn Python The Hard Way-Ecercise16~20

Exercise16:读写文件 from sys import argv script, filename = argv #创建的文件名 print "We're going to erase %r." % filename print "If you don't want that, hit CTRL-C (^C)." print "If you do want that, hit

2014-01-25 14:43:26 701

翻译 Learn Python The Hard Way-Ecercise11~15

Exercise11: 提问 print "How old are you?", age = raw_input() print "How tall are you?", height = raw_input() print "How much do you weight?", weight = raw_input() print "So, you're %r old, %r tall and

2014-01-25 13:28:49 693

翻译 Learn Python The Hard Way-Ecercise6~10

Exercise6:字符串和文本 x = "There are %d types of people." %10 binary = "binary" do_not = "don't" y = "Those who know %s and those who %s." %(binary, do_not) print x print y print "I said: %r." %x pr

2014-01-25 11:58:24 863 1

翻译 Learn Python The Hard Way-Ecercise1~5

Exercise1:第一个程序 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 touch th

2014-01-19 16:51:58 695

原创 Learn Python The Hard Way-笨方法学Python

在寒假之前就已经有自学Python的想法,这次也没有着急去图书馆借一大堆书回来看,因为每次放假从图书馆借的书回家后都没怎么碰…… 在知乎关于 Python 的经典入门书籍有哪些?上有人推荐Learn Python The Hard Way这个网站,网站的作者Zed.A.Shaw把Python的学习分成了50几个小的练习来进行,虽说是第一次碰到这种学习方式,但从期末考试的应试经验来讲,一边

2014-01-19 15:43:54 896

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除