top of page

PROGRAMMING CHALLENGES

Shopping Cart Total

Difficulty:

1 Easy

8 Practise Exam Questions

Topic:

Write a program to calculate the total cost of items in a shopping cart. The cart is represented as a list of tuples, each containing the item price and quantity. Output the total cost.

Inputs: List of tuples (price, quantity). Outputs: Total cost. Calculations: Multiply price by quantity and sum. Variables: cart, total_cost.

Need help with your programming skills?

If you need more help than just independent practise, then we're here for you. Book a 1:1 with us and we will be able to guide you to becoming a proficient programmer who can tackle any of the challenges an exam board can throw at you.

bottom of page