Advertisement
fumanbest

Alcohol Market

Oct 16th, 2018
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. priceWhiskey = float(input())
  2. beerQuantity = float(input())
  3. wineQuantity = float(input())
  4. brandyQuantity = float(input())
  5. whiskeyQuantity = float(input())
  6.  
  7. priceBrandy = (priceWhiskey / 2)
  8. priceWine = priceBrandy - (0.4 * priceBrandy)
  9. priceBeer = priceBrandy - (0.8 * priceBrandy)
  10.  
  11. sumWhiskey = (priceWhiskey * whiskeyQuantity)
  12. sumBrandy = (priceBrandy * brandyQuantity)
  13. sumWine = (priceWine * wineQuantity)
  14. sumBeer = (priceBeer * beerQuantity)
  15. print('%.2f' % (sumWhiskey+sumBrandy+sumWine+sumBeer))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement