Write another program that prompts for a list of numbers as above and at the end prints out both the maximum and minimum of the numbers instead of the average.

Write another program that prompts for a list of numbers as above and at the end prints out both the maximum and minimum of the numbers instead of the average.




a=raw_input('Enter a number:')
min=a
max=a
while a!='done':
    try:
        a=float(a)
        if(float(a)>float(max)):
            max=a
        if(float(a)<float(min)):
            min=a
    except:
        print "Please insert a number"
    a=raw_input("Enter a number:")
print "Max:",max
print "Min:",min


Learn More :