Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

I need help writing this program in python. It's fairly simple, but I'm having trouble with my internet so I don't really have the actual attachment

I need help writing this program in python. It's fairly simple, but I'm having trouble with my internet so I don't really have the actual attachment from IDLE, but I only have up to part a. Can you help me write it? I don't know how to add the list or really anything else. I'm having so much trouble!

PART 3a

Imagine that you are helping to build a store management system for a fast food restaurant. Given the following lists, write a program that asks the user for a product name. Next, find out if the restaurant sells that item and report the status to the user. Allow the user to continually inquire about product names until they elect to quit the program.

Here are some lists to get you started:

= [, , ] = [, , ]

And here's a sample running of your program:

product (q)uit: sEnter a product name: soft drinkWe sell at per unit(s)earch product (q)uit: sEnter a product name: saladSorry, we don't sell "salad"(s)earch for product or (q)uit: voldemortInvalid option, try again(s)earch for product or (q)uit: qSee you soon!

Part 3b

Next, extend your program so that it keeps track of how many products the store currently has to sell. Default the store to have 10 soft drinks, 5 onion ringss and 20 small fries. Hint: you might want to create a new list to store this data! - once you have this information in place you should modify your program to do the following:

  • Update the search feature to include a report of how many products the store currently has
  • Add a new feature that lists ALL products, their prices and the amount the store has available to sell

Here's a sample running of your program:

(q)uit: sEnter a product name: soft drinkWe sell at per unitWe currently have stock(s)earch, (l)ist (q)uit: lPrice Quantity(s)earch, (l)ist (q)uit: sEnter a product name: pikachuSorry, we don't sell "pikachu"(s)earch, (l)ist or (q)uit: qSee you soon!

Part 3c

Next, add in an "add" feature that lets users add a new product to the store. When you add a product you will need to ask the user for the name of the product, the cost of the product and how many items the store has available to sell. Validate this data - you cannot add a product that already exists and both the price and inventory amount must be positive. Here's a sample running of the program:

(q)uit: lPrice Quantity(s)earch, (l)ist, (a)dd (q)uit: aEnter a product name: onion ringsSorry, we already sell that product. Try again.Enter a product name: dbl onion ringsEnter a product cost: Invalid cost. Try again.Enter a product cost: How many these products we have? Invalid quantitiy. Try again.How many these products we have? Product added!(s)earch, (l)ist, (a)dd (q)uit: lPrice Quantity(s)earch, (l)ist, (a)dd (q)uit: sEnter a product name: dbl onion ringsWe sell at per unitWe currently have stock(s)earch, (l)ist, (a)dd (q)uit: qSee you soon!

Part 3d

Next, add in a "remove" feature that lets users remove products from the database. Here's a sample running of the program:

(q)uit: lPrice Quantity(s)earch, (l)ist, (a)dd, (r)emove (q)uit: rEnter a product name: pikachuProduct doesnt remove.(s)earch, (l)ist, (a)dd, (r)emove (q)uit: rEnter a product name: small friesProduct removed!(s)earch, (l)ist, (a)dd, (r)emove (q)uit: lPrice Quantity(s)earch, (l)ist, (a)dd, (r)emove (q)uit: rEnter a product name: soft drinkProduct removed!(s)earch, (l)ist, (a)dd, (r)emove (q)uit: lPrice Quantity(s)earch, (l)ist, (a)dd, (r)emove (q)uit: qSee you soon!

Part 3e

Add in the ability to modify a product. Users should be able to modify the name, cost or quantity of a product. Note that you will need to perform data validation as needed. Here's a sample running of your program:

(s)earch, (l)ist, (a)dd, (r)emove, (u)pdate or (q)uit: lPrice Quantity(s)earch, (l)ist, (a)dd, (r)emove, (u)pdate or (q)uit: uEnter a product name: burgerProduct doesn't exist. Can't update.(s)earch, (l)ist, (a)dd, (r)emove, (u)pdate (q)uit: uEnter a product : soft drinkWhat would you ?(n)ame, (c)ost (q)uantity: nEnter a : onion rings !Enter a : soft drink royaleProduct has been (s)earch, (l)ist, (a)dd, (r)emove, (u)pdate (q)uit: lPrice Quantity(s)earch, (l)ist, (a)dd, (r)emove, (u)pdate (q)uit: uEnter a product : onion ringsWhat would you ?(n)ame, (c)ost (q)uantity: cEnter a : Invalid !Enter a : Product has been (s)earch, (l)ist, (a)dd, (r)emove, (u)pdate (q)uit: lPrice Quantity(s)earch, (l)ist, (a)dd, (r)emove, (u)pdate (q)uit: uEnter a product : small friesWhat would you ?(n)ame, (c)ost (q)uantity: qEnter a quantity: Invalid quantity!Enter a quantity: Product quantity has been (s)earch, (l)ist, (a)dd, (r)emove, (u)pdate (q)uit: lPrice Quantity(s)earch, (l)ist, (a)dd, (r)emove, (u)pdate (q)uit: uEnter a product : soft drink royaleWhat would you ?(n)ame, (c)ost (q)uantity: Invalid (s)earch, (l)ist, (a)dd, (r)emove, (u)pdate (q)uit: qSee you soon!

Part 3f

Finally, add in a reporting feature to your program that finds the highest priced product, the lowest priced product and the total value of all inventory in the store (product cost * product quantity). Here's a sample running of your program:

(s)earch, (l)ist, (a)dd, (r)emove, (u)pdate, r(e)port or (q)uit: lPrice Quantity(s)earch, (l)ist, (a)dd, (r)emove, (u)pdate, r(e)port or (q)uit: e1.49 (small fries)0.99 (soft drink)Total value of all products: 46.15(s)earch, (l)ist, (a)dd, (r)emove, (u)pdate, r(e)port or (q)uit: qSee you soon!
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question