手记

Python function

#! /usr/bin/python

def max (x,y):
if (x > y):
print "max number x is:",x
else:
print "max number y is:",y
def min (x,y):
if (x >y):
print "min number x is:",x
else:
print "min number y is:",y
def sum (x,y):
z=x+y
print "sum is:",z

max(4,6)
min(7,8)
sum(12,13)

0人推荐
随时随地看视频
慕课网APP