Assume these facts:

i. A course grade is either 0 or a decimal number between 0.7 and 4.0.
ii. A course percentage of p = 96 gives a grade of 4.0 and a course percentage of p = 43 gives a grade of 0.7. Between these two percentages, the grade is given by a linear function.

Find a multipart function that calculates the grade based on the course
percentage p. Make sure to specify the domain and range of this function.

domain is p = 0 to p = 100

range is g = 0 to g = 4.0
p<43 , g = 0
43 </= p <96 , g = [ (4-0.7)/(96-43)] ( p-43) + 0.7 = .06226 p - 1.977
p >/= 96 , g = 4.0