Python: Basic: Weekly Income

Write the function weekly_income that takes an integer hours corresponding to total worked hours and returns the income based on worked hours and the hourly rate. The hourly rate for less than 40, between 40 to 50, and above 50 hours/week is $15, $20, and $25 respectively.


weekly_income(10) -> 150
weekly_income(45) -> 700

Test 1    

Test 2    

Test 3    

Test 4    

Test 5    

Test 6