구구단

//--- gugudan.py

def GUGU(n):
result = []
i = 1
while i < 10:
result.append(n * i)
print ' %s * %d = %s \n' % (n,i, result[i-1])
i = i + 1
return " %s Dan, End \n" % n



-- Excute --
>>> import gugudan

>>> reload(gugudan)

>>> gugudan.GUGU(2)
2 * 1 = 2

2 * 2 = 4

2 * 3 = 6

2 * 4 = 8

2 * 5 = 10

2 * 6 = 12

2 * 7 = 14

2 * 8 = 16

2 * 9 = 18

' 2 Dan, End \n'
>>>
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기

Posted by 홍반장

2010/02/25 18:04 2010/02/25 18:04
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/5009

Trackback URL : http://tcbs17.cafe24.com/tc/trackback/5009

« Previous : 1 : ... 1445 : 1446 : 1447 : 1448 : 1449 : 1450 : 1451 : 1452 : 1453 : ... 6391 : Next »

블로그 이미지

- 홍반장

Archives

Recent Trackbacks

Calendar

«   2024/11   »
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Statistics Graph

Site Stats

Total hits:
237251
Today:
368
Yesterday:
1352