python函数def示例(计算梯形面积): vi aa.py #!/usr/bin/python def fun(a,b,h):s = (a+b)*h/2print s fun(3,4,5):wq python aa.py