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" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>; <tutor@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
>
>
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to