The question is: You have recently been employed by a company that specialises in application development. Your first

project is to help them design an application using Python that will help shoppers determine which
products to buy at the supermarket and price after a percentage discount is applied.

At a minimum, your application will:
1. Provide a menu asking the type of calculation needed (discount or best buy)
2. Based on the selection appropriate prompts should be presented
3. For best buy;
a. Ask for the cost of at least two products
b. Ask for the mass or quantity of the products
c. Tell the user which product is better value
4. For discount, consider a case where either the percentage discount is given, or the prices before and
after discount are given.
a. For the first case, you should ask the user for the ticket price and percentage discount then tell
the user the unit price after discount
b. For the second case, you should ask the user for the price before discount and after discount in
order to inform the user of the percentage discount
c. Finally, tell the user of the best deal

For extra credit:
You may consider adding extra functionality to the application, for example your code could:
a. Consider the quality of the product in its overall value (cheaper is not always better!)
b. Incorporate a shopping list with costing
c. Code accounts for misuse (equal value, incorrect inputs)
d. Consider using loops and prompts in order to avoid having to re-run the code to perform another
calculation. Remember to give the user the option to quit!

I m really sorry if this is too much, but my code isn t working... at all. I just have a feeling that I messed everything up.

No way I'm going to program this whole thing. Looks like a good time to learn debugging. Check the correctness of each of your functions. Step through the code and watch the variables. Start with the low-level first. Once you have convinced yourself that each simple function works, work your way up the calling tree. Skill in debugging will be required your whole life if you pursue a career in programming.

Since you have posted no code, it's hard to say what is wrong. Maybe you could post one routine, and explain what you want it to do. Then maybe we can check to be sure that's what it actually does. Do NOT simply drop a couple hundred lines of code here and expect someone to spend several hours figuring it out.

google is your friend. There are many online discussions and examples of how to debug code. I have no experience in Python, but I spent 40 years as a programmer, and well know the frustration and satisfaction of writing readable and working code.

No problem! I'm here to help. It's understandable that you might feel overwhelmed when starting a new project, but we can break it down step by step. Let's start by reviewing the requirements and then we can troubleshoot your code.

To design the application using Python, you will need to:

1. Provide a menu asking the type of calculation needed (discount or best buy):
- You can use the `input()` function to ask the user for their selection. Store the selection in a variable.

2. Based on the selection, present appropriate prompts:
- Use `if` statements or a `switch` statement to determine the selected option and provide the appropriate prompts to the user.

3. For the "best buy" calculation:
a. Ask for the cost of at least two products:
- Use `input()` to ask the user for the cost of each product. Store the costs in variables.

b. Ask for the mass or quantity of the products:
- Use `input()` to ask the user for the mass or quantity of each product. Store the values in variables.

c. Compare the value of each product and inform the user which product is a better value:
- Calculate the value of each product by dividing the cost by the mass/quantity.
- Compare the values and use `print()` to inform the user of the better product.

4. For the "discount" calculation:
- Consider two cases: percentage discount given or prices before and after discount given.
a. For the first case:
- Use `input()` to ask the user for the ticket price and percentage discount.
- Calculate the unit price after the discount by subtracting the discount from the ticket price.
- Use `print()` to inform the user of the unit price after the discount.

b. For the second case:
- Use `input()` to ask the user for the price before and after the discount.
- Calculate the percentage discount by dividing the difference between the prices by the price before the discount.
- Use `print()` to inform the user of the percentage discount.

c. Finally, inform the user of the best deal (e.g., lowest price or highest discount).
- Use `if` statements or a comparison to determine the best deal and use `print()` to inform the user.

For extra credit, you can consider adding additional functionality to the application as mentioned in the requirements:

- Quality of the product in overall value:
- You can ask the user to rate the quality of each product and incorporate this rating into the calculation of value.

- Shopping list with costing:
- Allow the user to input a shopping list and calculate the total cost of all the items.

- Code for misuse:
- Add validation checks to ensure that inputs are valid (e.g. not negative numbers, correct data types).

- Loops and prompts:
- Implement loops to avoid having to re-run the entire code for multiple calculations. Provide a prompt to ask the user if they want to perform another calculation or quit.

Now let's discuss the specific issues you are facing with your code. Please share your code, and I'll be happy to help you troubleshoot it.