Python
Clauria
这个作者很懒,什么都没留下…
展开
-
Python学习笔记(1)——Pylatin
前天在Codecamedy学习Python进度到了80%,结果今天进去发现又回到了4%,好气,但也要保持围笑 为防止再次从头再来,在这里粘下代码,也算是记笔记吧 1-6: print 'Welcome to the Pig Latin Translator!' # Start coding here! original= raw_input('Enter a word: '原创 2017-08-03 18:44:29 · 358 阅读 · 0 评论 -
Python学习笔记(2)——Functions
第一次用CSDN感觉很新奇 写来自己玩(^▽^) 排版什么的就不太在意啦(捂脸)5.def one_good_turn(n): return n + 1def deserves_another(n): return one_good_turn(n) + 26.def cube(number): return number**3 def by_three(number): if nu原创 2017-08-03 20:44:24 · 329 阅读 · 0 评论 -
Python学习笔记(3)——Taking a Vacation
5.def hotel_cost(nights): return 140 * nightsdef plane_ride_cost(city): if city == "Charlotte": return 183 if city == "Tampa": return 220 if city == "Pittsburgh": return 222 if ci原创 2017-08-03 21:19:08 · 572 阅读 · 0 评论 -
Python学习笔记(4)——Python Lists and Dictionaries
突然发现我的博客竟然还有阅读量 是不是写的太随意了 哎呀 不管啦 写给自己看:p5.suitcase = ["sunglasses", "hat", "passport", "laptop", "suit", "shoes"]# The first and second items (index zero and one) first = suitcase[0:2]# Third and fou原创 2017-08-03 21:59:45 · 368 阅读 · 0 评论 -
Python学习笔记(5)——A Day at the Supermarket
9.prices = { "banana" : 4, "apple" : 2, "orange" : 1.5, "pear" : 3, } stock = { "banana" : 6, "apple" : 0, "orange" : 32, "pear" : 15, }for key in prices: print key print "pri原创 2017-08-03 22:43:52 · 335 阅读 · 0 评论