Python--函数
2019-02-01 本文已影响0人
YI_YI_
函数的定义
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))