Coding Task: 02.03 Shopping Cart Confirmation

In this activity, you will be write a program which will wait for your confirmation before pretending to check out a shopping cart. Don’t worry no money will be charged on your credit card!

Your Task

In the editor below, complete the code so that the program displays the amount in your shopping cart, then waits for the user to confirm by pressing the [Enter] key, and then finally displays that their credit card was successfully charged.

Requirements

  • The program should run without any errors.
  • The program should perform the following steps:
    • Display the text: Your shopping cart total is : $99.95
    • Display the text: Press [Enter] to confirm your purchase
    • Wait for the user to press the Enter key
    • Display the text: Your credit card has been successfully charged. Thank you for your purchase!

Example

Below is an interactive demo of how the program should run. Play around with the program to see how your program should also behave.

Python Reference Sheet

Remember to use the Python reference sheet to help you with your code! Click on one of the buttons below:

Scroll to Top
Scroll to Top