Question: Create a script that keeps track of the goods the user placed into their cart and totals it at the end. The three functions should

Create a script that keeps track of the goods the user placed into their cart and totals it at the end. The three functions should be used - def_home(): - the home menu, def_goods(): - displays goods that can be purchased, def_item(): - keeps track of the count and cost of goods to total them and display when the script is ended, and more if needed..

** strip the string input/user input. consider for upper/lower case inputs. no global variables. function must return the option selected.**

EXAMPLE CODE:

Home:

a. Goods

b. Done

Please choose either option a or b: f

Not a valid option, try again: a

Goods:

1. Pizza - $3.00

2. Chips - $1.00

3. Soda - $2.00

Please choose a good: 14

Not a valid option: 2

Chips have been added to the cart.

Home:

a. Goods

b. Done

Please choose either option a or b: a

Goods:

1. Pizza - $3.00

2. Chips - $1.00

3. Soda - $2.00

Please choose a good: 3

Soda has been added to the cart.

Home;

a. Goods

b. Done

Please choose either option a or b: a

Goods:

1. Pizza - $3.00

2. Chips - $1.00

3. Soda - $2.00

Please choose a good: 2

Chips have been added to the cart.

Home:

a. Goods

b.

Done Please choose either option a or b: b

Thank you for shopping with us!

(1) - Pizza - $3.00

(2) - Chips - $2.00

(1) - Soda - $2.00

Your total is $7.00

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!