[Tutor] Income calculator

Ulrich Holtzhausen ulrich at lavabit.com
Thu Sep 20 10:16:40 CEST 2007


Alan Gauld wrote:
> "Boykie Mackay" <boykie.mackay at gmail.com> wrote
>
>   
>> doesn't seem to be properly formatted.There should be a comma after 
>> the
>> closing quotation marks,a closing bracket after the first variable 
>> and a
>> % sign before the next i.e:
>>
>>     
>>> print "Your expected earnings for %s is %d", 
>>> %(financeLogs['month']),%
>>> financeLogs['total'])
>>>       
>> Hope above works!
>>     
>
> Nope, this is wrong. The OP had it correct.
> String formatting has a string followed by a % followed by a tuple of 
> values.
> Did you actually try executing the line of code you posted? What 
> happened?
>
> Alan G. 
>
>   
Thanks all, I'm having trouble figuring out how to reply to your 
inputs...my first time ever I joined some mailing list 
tutori-ish/user-group thing :D . Thanks for all your help once again. I 
think I might have sent one or two e-mails to individuals instead of via 
the tutor. Sorry if so.
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>
> ________________________________________________________________________________
> Shelter from rain, wind and sun is a basic human need. With your help,
> deserving families can have decent places to call home.
> http://lavabit.com/apps/director?ad=5
> ________________________________________________________________________________
>
>   




More information about the Tutor mailing list