csev/py4e

Line 7 in py4e/code3/pay3.py and py4e/code/pay3.py

solomon-s-b opened this issue · 2 comments

Exercise 2 in chapter 3 line 7 should be:

pay = hours * rate + (hours - 40) * rate * 0.5

instead of:

pay = hours * rate + (hours - 40) * rate * 1.5

as it is in py4e/code3/pay2.py and py4e/code/pay2.py on line 6.

In my opinion lines 6 and 7 should be:

if hours > 40:
pay = 40 * rate + (hours - 40) * rate * 1.5

instead of
if hours > 40:
pay = hours* rate + (hours - 40) * rate * 1.5

if you appy the distributive property (if I'm saying it right) you'll see that you are saying the same :)