If you would like to know what is the unit price per ounce of the candy, you can calculate this using the following steps:
1 gram ... 0.03527 ounces
340.23 grams = 340.23 * 0.03527 ounces = 11.999 ounces ... 12 ounces
12 ounces ... $18.99
1 ounce ... $x = ?
12 * x = 18.99 * 1
12 * x = 18.99 /12
x = 18.99 / 12
x = $1.5825
The unit price per ounce of the candy is $1.58.