码迷,mamicode.com
首页 >  
搜索关键字:exercise 1-3    ( 479个结果
Bootstrap——Jumbotron编写
Navbar example This example is a quick exercise to illustrate how the default, static navbar and fixed to top navbar work. It includes the responsive....
分类:其他好文   时间:2014-10-27 12:21:57    阅读次数:192
A Tour of Go Exercise: Slices
ImplementPic. It should return a slice of lengthdy, each element of which is a slice ofdx8-bit unsigned integers. When you run the program, it will di...
分类:其他好文   时间:2014-10-27 06:54:12    阅读次数:281
A Tour of Go Exercise: Loops and Functions
As a simple way to play with functions and loops, implement the square root function using Newton's method.In this case, Newton's method is to approxi...
分类:其他好文   时间:2014-10-27 00:18:38    阅读次数:219
Exercise 39: Dictionaries, Oh Lovely Dictionaries
# create a mapping of state to abbreviationstates = {'Oregon': 'OR','Florida': 'FL','California': 'CA','New York': 'NY','Michigan': 'MI' }# create a b...
分类:其他好文   时间:2014-10-26 13:00:02    阅读次数:160
Exercise 40: Modules, Classes, And Objects
class Song(object): def __init__(self, lyrics): self.lyrics = lyrics def sing_me_a_song(self): for line in self.lyrics: print linehappy_bda...
分类:其他好文   时间:2014-10-26 12:59:54    阅读次数:134
Exercise 35: Branches and Functions
from sys import exitdef gold_room(): print "This room is full of gold. How much do you take?" next = raw_input("> ") if "0" in next or "1" in...
分类:其他好文   时间:2014-10-25 15:45:58    阅读次数:169
Exercise 33: While Loops
while用起来不如for安全。i = 0numbers = []while i < 6: print "At the top i is %d" % i numbers.append(i) i = i + 1 print "Numbers now: ", numbers print "At ...
分类:其他好文   时间:2014-10-25 11:48:19    阅读次数:152
Exercise 32: Loops And Lists
the_count = [1, 2, 3, 4, 5]fruits = ['apples', 'oranges', 'pears', 'apricots']change = [1, 'pennies', 2, 'dimes', 3, 'quarters']# this first kind of f...
分类:其他好文   时间:2014-10-25 11:45:51    阅读次数:199
Exercise 34: Accessing Elements Of Lists
自己的几个list常用用法。mylist = [i for i in range(10)]mylist.pop(-1)mylist.append(9)mylist_1 = [i for i in range(10,20)]mylist_2 = zip(mylist, mylist_1)mylist....
分类:数据库   时间:2014-10-25 11:44:29    阅读次数:213
Exercise 31: Making Decisions
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 ....
分类:其他好文   时间:2014-10-24 18:34:08    阅读次数:242
479条   上一页 1 ... 41 42 43 44 45 ... 48 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!