Jalissa bought a backpack for $30 and n notebooks for $2.50 each.

a. Write a function that shows the amount Jalissa spent on her backpack and n notebooks.
b. If she spent $40, how many notebooks did she buy?