This kind of function is called step-function. The weight need not be a counting number (like 1,2,3...); for instance, it could be 1.5. However, the cents are "measure" with units (again 1,2,3...). So, the idea of the function is to approximate the value of a non-counting weight, to a counting prize (in cents).
Now, as to the question, we have two principal candidates: 45 and 47. The value will always be the filled circle. (this is just a convention). Then, the cost for an item weighing 4 oz is 45 cents.