Answer:
y = kx where k is cost/piece of candy, x is pieces of candy, and y is the total cost.
Explanation:
Let's start by defining the terms:
Let x be the number of pieces of candy purchased (pieces).
Let k be the cost per piece of candy ($/piece)
Let y be the total cost of the candy purchased.
The total cost, y, will be the number of pieces, x, time the cost per piece, k.
y = kx