Question

In: Computer Science

Solve question by python Question: Day Old Bread A bakery sells loaves of bread for $3.49...

Solve question by python

Question: Day Old Bread
A bakery sells loaves of bread for $3.49 each. Day old bread is discounted by 60 percent. Write a program that begins by reading the number of loaves of day-old bread being purchased from the user. Then your program should display the:
• Regular price for the bread
• The discount because it is a day old
• The total price.
Reading input: 1 mark
All of the values should be displayed using two decimal places, and the decimal points in all of the numbers should be aligned when reasonable values are entered by the user.
Declare the bread price and the discount amount as constants.
Include appropriate comments throughout your code including a header comment to briefly describe the purpose of your code.
Name your file: dayoldbread.py

Solutions

Expert Solution

#constants are declared

PRICE=3.65

DISCOUNT=0.6 #60%

#reading input from user

breds=int(input("Enter number of loaves of day-old bread: "))

#prining original and discounted price

print("Regular price ",PRICE)

print("Discounted Price ",(PRICE*DISCOUNT))

#printing total price

print("Total Price ",round(breds*(PRICE*DISCOUNT),2))


Related Solutions

Exercise 5: Day Old Bread A bakery sells loaves of bread for £1.49 each. Day old...
Exercise 5: Day Old Bread A bakery sells loaves of bread for £1.49 each. Day old bread is discounted by 60 percent. Write a program that begins by reading the number of loaves of day old bread being purchased from the user. Then your program should display the regular price for the bread, the discount because it is a day old, and the total price. All of the values should be displayed using two decimal places, and the decimal points...
The number of loaves of bread sold per day by an organic bakery over the past...
The number of loaves of bread sold per day by an organic bakery over the past five years can be treated as a random variable that is normally distributed. This distribution has a mean of 77.5 and a standard deviation of 14.4 loaves. Suppose a random sample of 36 days has been selected. Determine the probability that the average number of loaves sold in the sample of days exceeds 80 loaves. First find the standard error of the mean. Now...
7. Loaves of bread in a certain bakery are approximately normally distributed with a mean length...
7. Loaves of bread in a certain bakery are approximately normally distributed with a mean length of 32 centimeters and a standard deviation of 2 centimeters. If a loaf is 34 centimeters long, how many standard deviation(s) is it from the mean? Show all work. (2 points) If a loaf is 28 centimeters long, how many standard deviation(s) is it from the mean? Show all work. (2 points) What percentage of the loaves are expected to be between 30 to...
The local bakery bakes more than a thousand 1-pound loaves of bread daily, and the weights...
The local bakery bakes more than a thousand 1-pound loaves of bread daily, and the weights of these loaves varies. The mean weight is 1.6 lb. and 4 oz., or 839 grams. Assume the standard deviation of the weights is 20 grams and a sample of 34 loaves is to be randomly selected. (a) This sample of 34 has a mean value of x, which belongs to a sampling distribution. Find the shape of this sampling distribution. skewed right approximately...
Suppose Andy can make 20 loaves of bread in a day, or 4 dresses in a...
Suppose Andy can make 20 loaves of bread in a day, or 4 dresses in a day. Write down his production possibilities frontier equation, and then graph it. Explain what the line itself represent, what the area under the line represents, and what the area above the line represents.
A bakery would like you to recommend how many loaves of its famous marble rye bread...
A bakery would like you to recommend how many loaves of its famous marble rye bread to bake at the beginning of the day. Each loaf costs the bakery ​$4.00 and can be sold for ​$5.00. Leftover loaves at the end of each day are donated to charity. Research has shown that the probabilities for demands of​ 25, 50, and 75 loaves are 30​%, 25​%, and 45​%, respectively. Make a recommendation for the bakery to bake​ 25, 50, or 75...
A bakery would like you to recommend how many loaves of its famous marble rye bread...
A bakery would like you to recommend how many loaves of its famous marble rye bread to bake at the beginning of the day. Each loaf costs the bakery $2.00 and can be sold for $7.00. Leftover loaves at the end of each day are donated to charity. Research has shown that the probabilities for demands of 25, 50, and 75 loaves are 35%, 20%, and 45%, respectively. Make a recommendation for the bakery to bake 25, 50, or 75...
Ask Your Teacher The local bakery bakes more than a thousand 1-pound loaves of bread daily,...
Ask Your Teacher The local bakery bakes more than a thousand 1-pound loaves of bread daily, and the weights of these loaves varies. The mean weight is 2 lb. and 3 oz., or 992 grams. Assume the standard deviation of the weights is 30 grams and a sample of 35 loaves is to be randomly selected. (b) Find the mean of this sampling distribution. (Give your answer correct to nearest whole number.) grams (c) Find the standard error of this...
Sally Artisan Bakery makes a variety of organic bread. The bakery is open every day from...
Sally Artisan Bakery makes a variety of organic bread. The bakery is open every day from 7 AM to 6 PM. At 4 PM each day, the bakery marks down its goods by 25%. It also offers a 10% discount every Sunday before 10 AM. Design a spreadsheet that displays the current date/time in one cell. Have your spreadsheet display the correct amount due when the user enters a sale amount, assuming no taxes will be charged.
Bakery A sells bread for $2 per loaf that costs $0.80 per loaf to make. Bakery...
Bakery A sells bread for $2 per loaf that costs $0.80 per loaf to make. Bakery A gives a 75% discount for its bread at the end of the day. Demand for the bread is normally distributed with a mean of 300 and a standard deviation of 30. What order quantity maximizes expected profit for Bakery A? a) 324.00 b) 300.17 c) 325.25
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT