Pythonを勉強して8日目です。
6334 ワード
独学していつも方向が探し出せないで、堅持し続けてどのみち収穫します。
はい、http://wiki.woodpecker.org.cn/moin/ZqQuickIntoPyこのページでいい情報を見つけました。変えてください。
「Quick Python Script Explanion for Programers」:
はい、http://wiki.woodpecker.org.cn/moin/ZqQuickIntoPyこのページでいい情報を見つけました。変えてください。
「Quick Python Script Explanion for Programers」:
- # _*_ coding: utf-8 _*_ #
- #From http://coffeeghost.net
-
- import os
-
- def main():
- print 'Hello world!'
-
- print "This is Alice's greeting."
- print 'This is Bob\'s greeting.'
-
- foo(5, 10)
-
- print '=' * 10
- print 'Current working directory is ' + os.getcwd()
-
-
- counter = 0
- conuter += 1
-
-
- food = ['appses', 'oranges', 'cats']
-
- for i in food:
- print 'I like to eat ' + i
-
-
- print 'Count to ten:'
- for i in range(10):
- print i
-
-
- def foo(param1, secondParam):
- res = param1 + secondParam
-
- print '%s plus %s is equal to %s' % (param1, secondParam, res)
-
- if res < 50:
- print 'foo'
-
- elif (res >= 50) and ((param1 == 42) or (secondParam == 24)):
- print 'bar'
-
- else:
- print 'moo'
-
- return res # This is a one-line comment.
- '''A multi-
- line string, but can also be a multi-line comment.'''
-
- if __name__ == '__main__':
- main()
中国語バージョンは下図の通りです。