【发布时间】:2016-02-12 17:11:08
【问题描述】:
我想计算长方体的面积。我试过这个功能:
def area(l, b, h):
return l*b*h
但我想提示用户输入类似的值
lx = float(input("Enter Length"))
如何定义这个函数?
【问题讨论】:
-
你的意思是像:
def area(): return float(input("Enter Length: "))*float(input("Enter Length: "))*float(input("Enter Length: "))?
标签: python python-2.7 python-3.x