Welcome to the Krusty Krab, where the burgers are delicious, the secret sauce is legendary, and SpongeBob is always excited to help! But SpongeBob needs your programming skills to calculate just the right amount of secret sauce for each Krabby Patty. Every patty is a different size, so the amount of sauce has to match perfectly. Let’s help SpongeBob ensure every customer leaves happy and satisfied!
Your job is to:
Ask the customer for their name and create a custom welcome message.
Calculate the volume of their Krabby Patty based on its dimensions.
Use the volume to figure out how much secret sauce is needed.
Generate a unique order ID for every customer to keep things organized.
Display a summary of the order, including the patty volume and the amount of secret sauce required.
Let’s make sure we’re ready for the lunch rush in Bikini Bottom!
BONUS TASKS:
Multiple Patties:
Allow the user to enter dimensions for multiple patties and calculate the total amount of sauce needed.
Add a Sauce Multiplier:
See if the user wants extra sauce, and if so, modify calculate_secret_sauce() to include a "sauce level" (e.g., extra sauce = 1.5× the normal amount).
Get the Customer’s Full Name
Write a function get_full_name() that prompts the user for their first and last name.
Return the full name as a single string
Generate a Unique Order ID
Write a function generate_id() that generates a random order ID between 1000 and 9999.
Return the ID.
Calculate the Krabby Patty Volume
Write a function calculate_volume() that prompts the user for the length, width, and height of the patty (in cm).
Return the volume using the formula: V = l * w * h
Calculate the Secret Sauce Needed
Write a function calculate_secret_sauce(volume) that takes the patty volume as an argument.
Use a fixed ratio of 0.05 mL of secret sauce per cubic centimeter of patty volume.
Return the amount of secret sauce required.
Write a Function to summarize the order
Scooby and Shaggy are hungry! They’re placing a giant snack order and need your help to make sure they get everything they want—without accidentally ordering something not on the menu.
Show them a menu of snacks.
Take their snack orders.
Confirm that their choices are valid.
Summarize their final order and calculate the total cost.
Sample Output: You can use this as an example, but it DOESN'T have to match mine exactly! Have fun and be creative!!!
1) Create a menu
This should be a list of lists. Each entry should be the Item Name, Item Price
This can be hard-coded
This should be done IN A FUNCTION
2) Show the Menu:
Write a function display_menu(menu) that takes the menu list as its parameter and prints each item on a new line with an index number.
3) Take Orders:
Write a function take_order(menu)
This displays the menu and lets the user input their snack choices.
Use a while loop to keep asking for snacks until the user types "done".
You must write a helper function which VALIDATES the input:
validate_input(menu, user_choice)
Makes sure the user selected something from the menu
Returns True / False
4) Calculate Cost
Write a function which will calculate the cost of the order
5) Generate Receipt
Write a function that generates a receipt ID number
This should be unique and not appear on ANY other order
6) Summarize the Order:
Write a function summarize_order() that takes a parameter, and displays the order on screen
The Order Cost must be included
Add a function manager_mode(menu) that allows the manager to:
Add items to the menu.
Remove items from the menu.
Change the price of an existing item.
Add a function to apply a discount if the total cost exceeds a certain amount (e.g., 10% off for orders over $10). or if they have a loyalty card