时间:2020-11-07 22:00:33 | 栏目:Python代码 | 点击:次
如下所示:
# 计算面积函数 def area(width, height): return width * height def print_welcome(name): print("Welcome", name) print_welcome("duhuifeng") w = int(input("请输入长方形的宽:")) h = int(input("请输入长方形的长:")) print(" area =", area(w, h))
运行结果: