Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[ Python ] Write an if statement that checks the stock number to determine whether or not the bake shop has enough. If we are

[Python] Write an if statement that checks the stock number to determine whether or not the bake shop has enough. If we are out of stock, print a message that tells the customer there are not enough of that item, and how many we do have left.
Dictionary:
monday_menu ={'choccy chipper': {'price': 2.50, 'stock': 120},
'fudgy pudgy': {'price': 2.50, 'stock': 120},
'key lime crime': {'price': 4.25, 'stock': 96},
'salty sailor': {'price': 4.40, 'stock': 60},
'blueberry blooper': {'price': 5.00, 'stock': 60}}
Variables:
item = input("What would you like to order? ")
quantity = int(input("How many would you like? "))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions

Question

Analyze the impact of mergers and acquisitions on employees.

Answered: 1 week ago

Question

Evaluate the importance of the employee handbook.

Answered: 1 week ago