Discuss / Python / 打卡Day5

打卡Day5

Topic source

VH立华

#1 Created at ... [Delete] [Delete and Lock User]

def findMaxAndMin(L):

    max=min=L[0]

    for x in L:

        if max<x:

            max=x

    for y in L:

        if min>y:

            min=y

    return max,min

def input_L(*numbers):

    L=[]

    for number in numbers:

        L.append(number)

    return L

def mian():

    L=[1,2,3,4,5]

    r=findMaxAndMin(L)

    print(r)


  • 1

Reply