[Tutor] Re: If elif not working in comparison
gerardo arnaez
garnaez at gmail.com
Sun Apr 3 22:32:40 CEST 2005
On Mar 29, 2005 3:06 AM, C Smith <smichr at hotmail.com> wrote:
> If you have Python 2.4 you might want to check out the decimal type
> that is now part of the language. There is a description at
>
> http://www.python.org/doc/2.4/whatsnew/node9.html
>
> >>> import decimal
> >>> a = decimal.Decimal('35.72')
> >>> b = decimal.Decimal('1.73')
> >>> a+b
> Decimal("37.45")
> >>> a-b
> Decimal("33.99")
> >>> a*b
> Decimal("61.7956")
> >>> a/b
> Decimal("20.64739884393063583815028902")
>
Would I used an if else: construction to determine where the INR value
lay and decide what precentage to increase it by?
More information about the Tutor
mailing list