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

Simeon Franklin simeonf at gmail.com
Thu Jul 9 00:55:23 CEST 2015


It looks like you have an indentation error on lines 10 and 14.

Large code samples don't work well in email - you might try formatting your
code blocks as fixed width in your email or better yet - make a gist (
https://gist.github.com/) and link to it.

More generally you have a few errors - take a look a stepping line by line
through your code (thanks to pythontutor.com) at http://goo.gl/Zkt3SJ

If you'd like to take this offline so the whole group doesn't read it I'd
be happy to debug with you a bit. Just reply to me without
baypiggies at python.org in the email...

-regards
Simeon Franklin

On Wed, Jul 8, 2015 at 3:26 PM, <admin.dslcomputer at gmail.com> wrote:

>  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
>     try:
>         value = float(num)
>     except ValueError:
>         print "Invalid input"
>     continue
>     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
>
>
>
> Regards,
> Hal
> Sent from Surface
>
>
> _______________________________________________
> Baypiggies mailing list
> Baypiggies at python.org
> To change your subscription options or unsubscribe:
> https://mail.python.org/mailman/listinfo/baypiggies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20150708/a9537990/attachment.html>


More information about the Baypiggies mailing list