Problem Description
A bakery sells loaves of bread for 185 rupees 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 in all of the numbers should be aligned when reasonable values are entered by the user.CODING ARENA
a=int(input())
b=a*185
print("Loaves Discount")
print("Regular Price",b)
print("Total Discount",b*.6)
print("Total Amount to be paid",b-(b*.6))
Test Case 1
Input (stdin)15
Expected OutputLoaves Discount
Regular Price 2775
Total Discount 1665.0
Total Amount to be paid 1110.0Test Case 2
Input (stdin)25
Expected OutputLoaves Discount
Regular Price 4625
Total Discount 2775.0
Total Amount to be paid 1850.0
✖
Share this Posts
Subscribe Our Newsletter
0 Comment
Post a Comment