python學習筆記之016.py

版權聲明:本文爲博主原創文章,未經博主允許不得轉載。 https://blog.csdn.net/zhendeaini18/article/details/77075431
#!/usr/bin/env python
# coding=utf-8
# Created Time:    2017-08-09 16:17:13
# Modified Time:   2017-08-09 16:31:31


def printMax(x,y):
    '''Prints the maximum of two numbers.


    The two values must be integers.'''


    x = int(x) # convert to integers,if possible
    y = int(y)


    if x > y:
        print x, 'is maximum'
    else:
        print y, 'is maximum'


printMax(3,5)
print printMax.__doc__
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章