1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
marin [14]
4 years ago
3

You work for a bakery that sells two items: muffins and cupcakes. the number of muffins and cupcakes in your shop at any given t

ime is stored in the variables muffins and cupcakes, which have been defined for you. write a program that takes strings from standard input indicating what your customers are buying ("muffin" for a muffin, "cupcake" for a cupcake). if they buy a muffin, decrease muffins by one, and if they buy a cupcake, decrease cupcakes by 1. if there is no more of that baked good left, print ("out of stock"). once you are done selling, input "0", and have the program print out the number of muffins and cupcakes remaining, in the form "muffins: 9 cupcakes: 3" (if there were 9 muffins and 3 cupcakes left, for example).
Business
2 answers:
Sauron [17]4 years ago
8 0

Answer:

buying = input()

while buying != "0":

if buying == "muffin":

if muffins > 0:

muffins -=1

else:

print("Out of stock")

elif buying == "cupcake":

if cupcakes > 0:

cupcakes -=1

else:

print("Out of stock")

buying = input()

print("muffins:", muffins, "cupcakes:", cupcakes)

Explanation:

The program above can be used to determine if a customer will buy a muffin or cupcakes at any given point in time. The program was developed by considering several factors that influence customer's decision such as the number of cupcakes and muffins available as well as the total number of customers' requests at any given time.

exis [7]4 years ago
4 0

I created this program in Python.

SMuffin = 10

SCake = 1

NewTrans = 'y'  #New transaction added for multiple inputs

while NewTrans == 'y':   #While is used for multiple transactions until the user inputs "0".

   Scheck = str(input("Enter cupcake or muffin: "))

   if Scheck == 'cupcake':

       if SCake == 0:

           print("Out of stock")

       else:

           print("Cupcake Sold")

           SCake -= 1

   elif Scheck == 'muffin':

       if SMuffin == 0:

           print("Out of stock")

       else:

           print("Muffin Sold")

           SMuffin -= 1

   elif Scheck == '0':

       print("Muffins:",SMuffin,"Cupcakes:",SCake)

   else:

       print("Invalid input!")

   NewTrans = str(input("New Transaction?: (y/n)"))

   if NewTrans == 'n':

       print("Muffins:",SMuffin,"Cupcakes:",SCake)

You might be interested in
A corporation has 40,000 shares of $25 par value stock outstanding. If the corporation issues a 3-for-1 stock split, the number
Grace [21]

A corporation has 40,000 shares of $25 par value stock outstanding. If the corporation issues a 3-for-1 stock split, the number of shares outstanding after the split will be 120,000 shares.

Stocks are gadgets of fair ownership in an agency. For a few businesses, shares exist as an economic asset providing for an identical distribution of any residual profits, if any are declared, in the shape of dividends.

In monetary markets, a share is a unit used in mutual finances, limited partnerships, and real estate funding trusts. Percentage capital refers to all of the stocks of an agency. The owner of shares within the agency is a shareholder of the business enterprise.

A share is referred to as a unit of possession that represents the same share of a business enterprise's capital. A percentage entitles the shareholders to an equal declaration of earnings and losses of the employer. There are majorly sorts of shares i.e. equity stocks and desire stocks.

Learn more about shares here brainly.com/question/25630152

#SPJ4

3 0
2 years ago
Question 7
elena-14-01-66 [18.8K]

Today's share price for CCN is $16.67

Today's share price for CCN can be determined using the Gordon constant dividend growth model

The Gordon growth model is used to determine the value of the share of a firm using the value of its dividend with the assumption that the firm grows at a constant rate.

The formula of the Gordon constant dividend growth model :  

price = d1 / (r - g)

d1 = next dividend to be paid = $0.50

r = cost of equity = 12%

g = growth rate = 9%

0.50 / (12% - 9%)

0.50 / 3%

0.50 / 0.03

= $16.67

A similar question was answered here: brainly.com/question/15023105?referrer=searchResults

6 0
3 years ago
Which of the following terms is not used in project management? A. Dummy activity. B. Latest finish. C. Optimistic time. D. Lump
zavuch27 [327]

Answer:

Lumpy demand is not used in project management.

The correct answer is  D

Explanation:

Dummy is a zero activity, which helps in network analysis.

Activity refers to a task in network analysis.                                                              

Latest finish time is the latest completion time of a project in network analysis.

Lumpy demand refers to low demand as a result of higher cost. It is not used in network analysis (project management)

8 0
3 years ago
The three broad types of factors of production are:
just olya [345]
Capital, labor, and natural resources
8 0
3 years ago
The relationship between a product line and product mix is Multiple Choice there is no significant difference other than minor p
Mars2501 [29]

Answer:

product mixes include product lines.

Explanation:

The product line is a group of products that are interrelated as they satisfy the needs and also they are used together and are sold to the similar customer group via similar outlets

It involved the product line that are offered by the company

Therefore according to the given situation, last one is correct answer

And, the same would be relevant

4 0
3 years ago
Other questions:
  • Why are there no jet streams in the equator?
    15·1 answer
  • A commercial oven with a book value of $67,000 has an estimated remaining 5 year life. A proposal is offered to sell the oven fo
    14·1 answer
  • A new building is to be constructed for a company and a fast connection between client and server systems within the building sh
    13·1 answer
  • Bob holds a portfolio of 20 stocks from different industries, whereas Sharon holds only one stock in her portfolio. Assuming the
    8·1 answer
  • *80 points* Introduce a blog owner (a company, organization, or school). Analyze a professional blog owned by a company or by a
    5·1 answer
  • Here are incomplete financial statements for Pharoah Company. Calculate the missing amounts. PHAROAH COMPANY Balance Sheet Asset
    9·1 answer
  • You are a finance intern at Chambers and Sons and they have asked you to help estimate the company's cost of common equity. You
    6·1 answer
  • ________leads to better quality and lower prices?
    7·1 answer
  • A worthless security had a holding period of six months when it became worthless on December 10, 2020. The investor who had owne
    11·1 answer
  • The price of ______ goods is a determinant of demand.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!