# 计算面积函数
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))
运行结果:
标签:area,Python,demo,长方形,height,int,print,width From: https://blog.51cto.com/u_15906863/5977825