[Tutor] Currency conversion
David Holland
davholla2002 at yahoo.co.uk
Mon Dec 12 14:24:36 CET 2005
Apologies if anyone has said this and I missed it, but
wouldn't it be better to change :-
"def rupees_from_dollars(d_doll):
return 43*(d_doll)
etc to" :-
"def conversiond_doll, x):
return x*(d_doll)
"
And in the main for eg dollars to
dollar_amount = conversionsion(doll, dollarexchange
rate) etc
You can then have one function for all currencies and
would be less code and easier to maintain.
___________________________________________________________
Yahoo! Exclusive Xmas Game, help Santa with his celebrity party - http://santas-christmas-party.yahoo.net/
More information about the Tutor
mailing list