[Baypiggies] ‘Maximum is None and the ‘Minimum is None’

admin.dslcomputer at gmail.com admin.dslcomputer at gmail.com
Thu Jul 9 00:26:37 CEST 2015

Hi Everyone:

When the user enters a series of number integers, the output reads:  ‘Maximum is None and the ‘Minimum is None’

What is the source of the syntax Error, below:

largest = None
smallest = None
while True:
    num = raw_input("Enter a number: ")
    if (num == "done") : break
        value = float(num)
    except ValueError:
        print "Invalid input"
    if smallest is None:
        smallest = value
    elif value < smallest:
  smallest = value
    print smallest, value
    if largest is None:
        largest = value
    elif value > largest:
        largest = value
    print largest, largest
print "Maximum is", largest
print "Minimum is", smallest



Sent from Surface
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20150708/bb9ffd81/attachment.html>

More information about the Baypiggies mailing list