your doing integer division, and / gets you the number of times 200 is divisible by 400, which is 0 times in a integer context.
try 200.0/400 if you make one a float, you get a float answer. or this... >>> size = float(200), float(400) >>> size[0]/size[1] 0.5 I'm still quite a python/django noob, so there may be a way more pythonic way to approach this, but I figure I'm close enough to the point that you're hopefully not going to go nuts. :) cheers On Sun, Jun 15, 2008 at 9:36 PM, Jarred Bishop <[EMAIL PROTECTED]> wrote: > > Hi, this is driving me crazy. I'm sure there is a VERY simple solution > but can't seem to find it. thanks for you help. > > if I have > > size = 200, 400 > return size[0]/size[1] > > it returns '0'. which isnt much help. how do i get '0.5' or '.5' ? > > Thanks. > > > -- Picante Solutions Limited e: [EMAIL PROTECTED] w: 06 757 9488 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---