開発環境
- OS X Mavericks - Apple(OS)
- Emacs (CUI)、BBEdit - Bare Bones Software, Inc. (GUI) (Text Editor)
- Python (プログラミング言語)
Learning Python (Mark Lutz (著)、Oreilly & Associates Inc)のPART III.(Functions and Generators)、CHAPTER 18(Arguments)、Test Your Knowledge: Quizを解いてみる。
その他参考書籍
Test Your Knowledge: Quiz
入出力結果(Terminal)
$ python3 Python 3.3.5 (default, Mar 15 2014, 14:51:54) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from sample import * >>> func1(1, 2) # 1 2 5 1 2 5 >>> func2(1, c=3, b=2) # 1 2 3 1 2 3 >>> func3(1, 2, 3) # 1 (2, 3) 1 (2, 3) >>> func4(a=1, c=3, b=2) # 1 {'c':3, 'b':2} 1 {'c': 3, 'b': 2} >>> func5(1, *(5, 6)) # 1 5 6 4 1 5 6 4 >>> l, m, n # (1, ['x'], {'a':'y'}) (1, ['x'], {'a': 'y'}) >>> quit() $
0 コメント:
コメントを投稿