translate python 02-func.ipynb