Mode Gelap

Recent in Fashion

Best Seller Books

Day Old Bread

  • 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 Output
    Loaves Discount

    Regular Price 2775

    Total Discount 1665.0

    Total Amount to be paid 1110.0
  • Test Case 2

    Input (stdin)
    25

    Expected Output
    Loaves Discount

    Regular Price 4625

    Total Discount 2775.0

    Total Amount to be paid 1850.0

Subscribe Our Newsletter

avatar
"By speaking behind my back, it means that you respect my existence enough not to act in front of my face."

Related Posts

0 Comment

Post a Comment

Article Top Ads

Parallax Ads

Article Center Ads

Article Bottom Ads