[Tutor] Thank you all! was (Re: How do fix this error?)
Nathan Pinno
falcon3166 at hotmail.com
Sat Sep 17 20:56:01 CEST 2005
Hey all,
I would like to thank everyone here and at Programmer's Heaven for all their help. Thanks again!
Gratefully,
Nathan Pinno
----- Original Message -----
From: "Alan G" <alan.gauld at freenet.co.uk>
To: "Nathan Pinno" <falcon3166 at hotmail.com>; <tutor at python.org>
Sent: Saturday, September 17, 2005 3:12 AM
Subject: Re: [Tutor] How do fix this error?
> Traceback (most recent call last):
> File "D:\Python24\add_tutor.py", line 18, in -toplevel-
> answer, guess = add(num1,num2)
> File "D:\Python24\add_tutor.py", line 5, in add
> guess = float(raw_input(a," + ",b," = "))
> TypeError: [raw_]input expected at most 1 arguments, got 4
>
> The error tells you what to do - give raw input 1 argument:
>
> guess = float(raw_input(a," + ",b," = "))
>
> The commas separate the arguments. You need to create
> the prompt string first and then feed it to raw_input.
>
> The string formatting operators may help here.
> See the Simple Sequences topic on my tutor for
> examples of string formatting.
>
> Alan G
> Author of the Learn to Program web tutor
> http://www.freenetpages.co.uk/hp/alan.gauld
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050917/c41222b4/attachment.htm
More information about the Tutor
mailing list