Answered step by step
Verified Expert Solution
Question
1 Approved Answer
[ Python ] Adjust the following code so that it will subtract the quantity ordered from the inventory: dictionary [ key ] [ ' sub
Python Adjust the following code so that it will subtract the quantity ordered from the inventory:
dictionarykeysubkey' dictionarykeysubkey' amounttosubtract
Then, test the code by saving to the variable quantity, and "salty sailor" to the variable item. Run your subtraction code, then call the stock for salty sailor. How many salty sailor cookies do we have after running your subtraction code?
Dictionary
mondaymenu choccy chipper': price: 'stock':
'fudgy pudgy': price: 'stock':
'key lime crime': price: 'stock':
'salty sailor': price: 'stock':
'blueberry blooper': price: 'stock':
Variables:
item inputWhat would you like to order?
quantity intinputHow many would you like?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started