Hi Roelof,
The problem is in quotation marks. Please use plain double instead of
curly quotes. (That's a common issue when you copy-paste the code from
pdf/doc)

On Thu, Aug 26, 2010 at 9:25 AM, Roelof Wobben <rwob...@hotmail.com> wrote:
> Hello,
>
> I have this exercise :
>
>
> Try each of the following formatted string operations in a Python shell and
> record the results:
>
> “%s %d %f” % (5, 5, 5)
> “%-.2f” % 3
> “%-10.2f%-10.2f” % (7, 1.0/2)
> print ” $%5.2fn $%5.2fn $%5.2f” % (3, 4.5, 11.2)
>
>
> But if I try in a python 2.7 IDLE enviroment I get this :
>
>>>> %s %d %f % (5, 5, 5)
> SyntaxError: invalid syntax
>>>> print “%s %d %f” % (5, 5, 5)
> SyntaxError: invalid syntax
>
> Roelof
>
>
> _______________________________________________
> Tutor maillist  -  tu...@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>

-- 
Thanks,
Volodymyr
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to