牌語備忘録 -pygo

あくまでもメモです。なるべくオフィシャルの情報を参照してください。

牌語備忘録 -pygo

2008-06-19から1日間の記事一覧

SICP 1.1.8 ブラックボックス抽象化の手続きの平方根の例をPythonでやってみた

Structure and Interpretation of Computer Programs sec_1.1.8 #1.1.8 Procedures as Black-Box Abstractions(ブラックボックス抽象化の手続き) #Internal definitions and block structure(内在的な定義とブロック構造) #平方根の例 def square(x): re…

SICP 1.2.1 再帰と反復の練習問題1.9をPythonでやってみた

SICP 1.2 Procedures and the Processes They Generate(手続きと生成プロセス) ## 1.2.1 Linear Recursion and Iteration(線形の再帰と反復) # 図 1.3:再帰の例 def factorial(n): if n == 1: return 1 return n * factorial(n - 1) print factorial(6) …