Discuss / Python / 交作业

交作业

Topic source

哒哒大萌

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

# -*- coding: utf-8 -*-

def findminmax(*a):

    min = a[0]

    max = a[0]

    for b in a:

        if b < min:

            min = b

        if b > max:

            max = b

    print(min,max)

    return

s = []

a = input('Please enter your numbers:')

for k in a.split(','):

    s.append(int(k))

findminmax(*s)


  • 1

Reply