[Baypiggies] Maximum to the Minimum

admin.dslcomputer at gmail.com admin.dslcomputer at gmail.com
Wed Jul 8 19:42:18 CEST 2015

Hi Everyone:

How do I rewrite the python script, below, to get a printout from the Maximum to the Minimum, and to convert a string into a number? 

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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20150708/89c2f4ef/attachment.html>

More information about the Baypiggies mailing list