Question 14: Operators Tolu’s Change

Tolu went to the shop to buy some snacks for his friends.
He bought 3 packs of biscuits and 2 bottles of juice, then paid ₦1000 at the counter.

  1. Store the price of one pack of biscuits in a variable called price_of_biscuits and set it to 150.

  2. Store the price of one bottle of juice in a variable called price_of_juice and set it to 250.

  3. Store the number of biscuit packs bought in a variable called packs_of_biscuits and set it to 3.

  4. Store the number of juice bottles bought in a variable called bottles_of_juice and set it to 2.

  5. Store the amount paid in a variable called amount_paid and set it to 1000.

  6. Calculate the total cost by multiplying the number of biscuits by the price of each, multiplying the number of juices by the price of each, and then adding the two results.

  7. Calculate the change by subtracting the total cost from the amount paid.

  8. Print the total cost and the change.

Write what you are looking for, and press enter to begin your search!