I dun understand the mistake. My aim is to accept an integer number. The
python lookup in IDLE asks for a string object but the interpreter returns
with the following error message. Some one pls explain.
Thank You
PS : I understand that i can do type conversion after getting input thru
Mahesh N wrote:
I dun understand the mistake. My aim is to accept an integer number. The
python lookup in IDLE asks for a string object but the interpreter
returns with the following error message. Some one pls explain.
Thank You
PS : I understand that i can do type conversion after
Mahesh N wrote:
I dun understand the mistake. My aim is to accept an integer number.
The python lookup in IDLE asks for a string object but the interpreter
returns with the following error message. Some one pls explain.
Thank You
PS : I understand that i can do type conversion after
On Dec 6, 2007 2:31 AM, Mahesh N [EMAIL PROTECTED] wrote:
I dun understand the mistake. My aim is to accept an integer number. The
python lookup in IDLE asks for a string object but the interpreter returns
with the following error message. Some one pls explain.
Thank You
PS : I understand
On Dec 6, 2007 2:37 AM, Eric Brunson [EMAIL PROTECTED] wrote:
Mahesh N wrote:
I dun understand the mistake. My aim is to accept an integer number.
The python lookup in IDLE asks for a string object but the interpreter
returns with the following error message. Some one pls explain.
Thank
On Dec 5, 2007 4:01 PM, Mahesh N [EMAIL PROTECTED] wrote:
I dun understand the mistake. My aim is to accept an integer number. The
python lookup in IDLE asks for a string object but the interpreter returns
with the following error message. Some one pls explain.
Thank You
PS : I understand
Bryan Fodness wrote:
speed = int(raw_input(prompt))
Is this how ALL known integers should be input?
Yes, with probably a try/except block and a while loop around it to
handle invalid input.
There are two good reasons for doing this instead of using input:
- it guarantees that the
On Dec 5, 2007 4:46 PM, Bryan Fodness [EMAIL PROTECTED] wrote:
On Dec 5, 2007 4:16 PM, Jerry Hill [EMAIL PROTECTED] wrote:
speed = int(raw_input(prompt))
Is this how ALL known integers should be input?
I don't think I understand the question. If you are prompting your
user to enter an
Mahesh N [EMAIL PROTECTED] wrote
PS : I understand that i can do type conversion after getting input
thru
raw_input(). But how does input() function work?
prompt=temme a number\n
speed =input(prompt)
Traceback (most recent call last):
File pyshell#56, line 1, in module
speed
Mahesh N [EMAIL PROTECTED] wrote
More over i find python to be a little sluggish after having worked
with C
and Java.
If you translate C or Java code into python you will usually
get a less than optimal implementation. Python should be
barely slower than Java and often faster. Compared to
C
On Dec 5, 2007 4:16 PM, Jerry Hill [EMAIL PROTECTED] wrote:
On Dec 5, 2007 4:01 PM, Mahesh N [EMAIL PROTECTED] wrote:
I dun understand the mistake. My aim is to accept an integer number. The
python lookup in IDLE asks for a string object but the interpreter
returns
with the following
11 matches
Mail list logo