Python

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))

上一篇下一篇

猜你喜欢

热点阅读