On 17/09/16 00:08, Sharon Wallace wrote:
> largest = None
> smallest = None
>
> while True:
> num = raw_input('Enter a number: ')
> if num = 'done' : break
should use == to test equality a single = is
an assignment and would give an error here
print num
try :
On 17/09/16 00:08, Sharon Wallace wrote:
> inp = raw_input
> largest = None
> smallest = None
>
> while True:
> num = raw_input('Enter a number: ')
> if num = 'done' : break
> print num
> try :
> num = float(inp)
On Sep 17, 2016 4:55 PM, "Sharon Wallace" wrote:
>
> Would you please help me with the last piece of this assignment?
>
>
>
> This is my code:
>
>
>
> largest = None
>
> smallest = None
>
>
>
> while True:
>
> num = raw_input("Enter a number: ")
>
> if num == "done
On Sep 16, 2016 8:12 PM, "Sharon Wallace" wrote:
>
In addition to showing us your code ,
Please show us whatever Trace back you got when you ran the code. I would
guess you are either getting an indentation error or syntax error in the
vicinity of line that begins if num =.
> inp = raw_input
>
>
On Fri, Sep 16, 2016 at 7:08 PM, Sharon Wallace
wrote:
> inp = raw_input
The above doesn't do what you think. It creates a name called inp
which is bound to the function raw_input
>
> largest = None
>
> smallest = None
>
>
>
> while True:
>
> num = raw_input('Enter a number: ')
>
>
inp = raw_input
largest = None
smallest = None
while True:
num = raw_input('Enter a number: ')
if num = 'done' : break
print num
try :
num = float(inp)
except :