函数的定义
def area(width,height):
return width*height
def print_welcome(name):
print("Welcome",name)
print_welcome('Oliva')
w = 12
h = 10
print("width = ", w ," height = ", h ," Area = ",area(w,h))
def area(width,height):
return width*height
def print_welcome(name):
print("Welcome",name)
print_welcome('Oliva')
w = 12
h = 10
print("width = ", w ," height = ", h ," Area = ",area(w,h))
本文标题:Python--函数
本文链接:https://www.haomeiwen.com/subject/yqllsqtx.html
网友评论