def total(initial = 5, *numbers, **keywords): count = initial for number in numbers: count += number for key in keywords: count += keywords[key] return count def printMax(x, y): '''Prints the maximum number, The two values must be have number.''' x = int(x) y = int(y) if x > y: print(x, ' is maximum number.') else: print(y, ' is maximum number.') print(total(10, 1, 2, 3, vegetables = 50, fruits = 100)) printMax(3, 5) print(printMax.__doc__)
时间: 2025-01-23 14:49:14