<br>You need to start over and slow down because you are getting the basic Scheme syntax wrong. <br>The gross pay function is already given:<br>(define (wage h)<br> (* 12 h))<br><br>You could modify it according to the previous suggestions to make it more readable:<br>
; By convention constants are named in upper case<br> (define TAX-RATE 0.15)<br> (define PAY-RATE 12)<br><br>(define (wage h)<br> (* PAY-RATE h))<br><br>Where did your tax function go? How could you use tax and wage to develop netpay? <br>
<br>Your attempt:<br> (define (gross hours)<br> (* hours pay-rate))<br> <br> (define (netpay gross tax-rate)<br> (-(gross)(* gross tax-rate)))<br><br>Has a few major issues: 1) You have defined gross to take one argument but when you "call" it from (my 2nd point) you have provided no arguments and 2) you have named a "gross" parameter in netpay and use it twice. Which "gross" do you think is being used? The function or the passed value?<br>
<br>Also:<br>(define (netpay hours : number? tax : 0.85)<br> (* hours 12)* tax)<br><br>Where did you get that syntax from? Follow the examples in the book. Additionally, that is not even the right formula for computing netpay. Follow the development of functions for the exercise exactly and the proper formula should be clear.<br>