Question: using python 1. A bakery sells loaves of bread for $3.49 each. Day old bread is discounted by 60 percent. Write a program that begins

 using python 1. A bakery sells loaves of bread for $3.49

using python

1. 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 total price. 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. a. Write a function that calculates the total price of the bread. It should take the number of loaves as an input and return the total price. b. Make sure your input is an integer 2. Develop a program that reads a four-digit integer from the user and displays the sum of the digits in the number. For example, if the user enters 3141 then your program should display 3 + 1+ 4+ 1 = 9. a. Write a function that calculates the total. It should take the number as an input and return the sum of digits. b. Make sure your input is an integer

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!