Line 7 in py4e/code3/pay3.py and py4e/code/pay3.py
solomon-s-b opened this issue · 2 comments
solomon-s-b commented
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.
MariusWaldvogel commented
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
konkiourtidou commented
if you appy the distributive property (if I'm saying it right) you'll see that you are saying the same :)