My python annoyances so far
Paul McGuire
ptmcg at austin.rr.com
Thu Apr 26 17:50:38 EDT 2007
More samples from that thread:
fica = Percent(7)
fedtax = Percent(15)
medicare = Percent(3)
deductions = fica + fedtax + medicare
gross = 100000
net = gross - deductions
print net # answer: 75000
wholesale = 10
markup = Percent(35)
retail = wholesale + markup
print retail # answer: 13.5
yearlyApprec = Percent(8)
basis = 10000
newbasis = basis + yearlyApprec + yearlyApprec + yearlyApprec
print newbasis # answer: 12597.12
-- Paul
More information about the Python-list
mailing list