Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

jyupter notebook coding please with dictionarly not list. Create a self checkout program that displays the total price for 3 supermarket items. Create inputs that

jyupter notebook coding please with dictionarly not list.
Create a self checkout program that displays the total price for 3 supermarket items. Create inputs that ask for each items name and price and associate variables with those inputs. After the user has finished inputting the names and prices of all items, display each item name, its price and the total price.
Sample output:
Bread - 4.50
Tomatoes - 1.99
Turkey - 6.99
Total - 13.48
Assignment
Assignment #2
Supermarket Self Checkout, continued
Add the following to your existing self checkout code in Assignment #1:
In addition to asking for item names and prices from Assignment #1, update your code to ask the user for a quantity for each item.
After the summary of items/prices/quantities and the total amount displays, prompt the user for a payment method. The possible choices will be cash or credit card.
Based on the input regarding payment method, your code should do the following:
If the user pays by cash, prompt them for the amount of cash to enter
If the user enters an amount greater than the total, display the amount they entered, the change they should receive and the message "Thank you for your purchase"
If the user enters an exact amount, display "Thank you for your purchase"
If the user enters an amount less than the total, display "You have not paid the full amount. Your items will be returned to the shelves. Thank you!"
If the user pays by credit card, display the amount charged to the credit card and the message "Thank you for your purchase"

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions

Question

Under what circumstances should densities be low? high?

Answered: 1 week ago