学习python
1.函数调用定义。
def sayHello():
print ('Hello World!')
sayHello()
2.函数形参
def printMax(a,b):
if (a>b):
print ( a, 'is maximum')
if (a<b):
print ( b, 'is maximum')
printMax (3,4)
3.局部变量和全局变量
def func(x):
print ('x is',x)
x=2
print ('Changed local x to', x)
x= 50
func(x)
print ('x is still' ,x )