On Sat, Mar 14, 2009 at 5:52 PM, R. Alan Monroe 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 typ
I'm sorry I wasn't more specifc. I will try to next time. Thanks Alan for
you help. (Both of you.)
-Ian
On Sat, Mar 14, 2009 at 9:13 PM, R. Alan Monroe wrote:
> > Success (as in number is entered) = Success
> > Failure (as in a letter is entered) = failure
>
> Working as designed :) Python is _s
"Ian Egland" wrote
Newbie here who can't figure out why this doesn't work:
It worked perfectly for me.
But then, maybe I expected it to do something different to
what you expected? When posting please tell us what you
expected to happen, what actually happened plus any error
messages (in ful
> Newbie here who can't figure out why this doesn't work:
> start = input("Please enter the starting number.\n>")
> print(type(start))
> while type(start)!=float:
> start = input("Sorry, that number was invalid.\nPlease enter the
starting number.\n>>")
> print(type(start))
Google to the r
> while type(start)!=float:
Did you try quotes around the word "float"?
Alan
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Newbie here who can't figure out why this doesn't work:
start = input("Please enter the starting number.\n>")
print(type(start))
while type(start)!=float:
start = input("Sorry, that number was invalid.\nPlease enter the
starting number.\n>")
print(type(start))
_