On Sat, Mar 14, 2009 at 5:52 PM, R. Alan Monroe <[email protected]> wrote:
>
>> while type(start)!=float:
>
> Did you try quotes around the word "float"?
That won't help, type(start) is a type object, not a string.
It's also possible that Ian is entering an integer, he didn't show the
input value:
In [1]: print type(input('Enter a number: '))
Enter a number: 123
<type 'int'>
Alan G's solution - explicit conversion using float() with an
exception handler - is the best way to do this.
Kent
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor