Question: Please use python method for coding. Please try coding without respective files. . Function Name: ingredients Parameters: item - a string that will be the

Please use python method for coding. Please try coding without respective files. Please use python method for coding. Please try coding without respective files.

. Function Name: ingredients Parameters: item - a string that will be the key in the dictionary. Return value: None Description: Mr. Krabs has ordered new ingredients for the Krusty Krab because their Krabby Patty is just so popular! Now it's SpongeBob's turn to organize everything that came in. Write a function that takes in a string and tells SpongeBob how much of that ingredient he has. Use the following dictionary in your function to help you do this: dict = {'buns':40, 'burger patties':20, 'pickles':55, 'lettuce':63, 'tomato': 46, 'onion':34} Test Cases: >>> ingredients ("pickles") SpongeBob has 55 pickles available to use. >>> ingredients ("buns") SpongeBob has 40 buns available to use

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!