Dear All,
I am trying to scrap the following website, however, I have
encountered some problems. As you can see, I am not really familiar
with regex and I hope you can give me some pointers to how to solve
this problem.
I hope I can download all the transaction data into the database.
However, I
I have a more simple-minded solution. The error appears to occur in testing
without revealing the problem by use of $1 base price in the test. Using
$10,000 as the base price in the test reveals absurd numbers. I think the real
problem lies in the inclusion of base price inappropriately, twi
> On Dec 12, 2015, at 2:03 AM, Jim Gallaher wrote:
>
> Hi everyone. I'm reading through a beginners Python book and came up with a
> super simple program. I'm not getting any errors and everything runs through,
> but there's a logical calculation error. What the program does is take an
> amo
Hi Alan,
I'm 100 percent sure I'm wrong. :-) I verified it when I fixed the mistake. The
problem was it was adding in the basePrice and the fixed rates/percentages each
time. So I figured it out when Ian said something about that.
Thanks for everyone's help! :-)
On Sat, Dec 12, 2015 at 01:03:05AM -0600, Jim Gallaher wrote:
> Hi everyone. I'm reading through a beginners Python book and came up
> with a super simple program. I'm not getting any errors and everything
> runs through, but there's a logical calculation error. What the program
> does is take a
I haven't verified this, but you are probably up against some
problem caused by using floating point to store money.
The problem is that, when people see something like the floating
point number, 3.15 they think, aha, this is a decimal number just
like I learned in school when I was 10 years old.
On 12/12/15 07:03, Jim Gallaher wrote:
> For example, if I put in a value of 1, it will output 752.12 as the sub
> total and 753.12 as the grand total. It's off by 1 on sub total and 2 on
> grand total.
Are you sure? Lets check the values...
> basePrice = int(input("Please enter in the price o
Hi everyone. I'm reading through a beginners Python book and came up
with a super simple program. I'm not getting any errors and everything
runs through, but there's a logical calculation error. What the program
does is take an amount and calculate a couple percentages and add a
couple fees.