python——函数和过程的区别

函数编程和过程编程的区别

__author__ = "Alex Li"
#函数编程
def func1():
    """testing1"""
    print('in the func1')
    return 0
#过程编程
def func2():
    '''testing2'''
    print('in the func2')

x=func1()
y=func2()

print('from func1 return is %s' %x)
print('from func2 return is %s' %y)

  

posted @ 2018-03-22 13:53  小公子ww  阅读(226)  评论(0编辑  收藏  举报