exDotaPro

27_july_2019_1_lemonade_stand

Jan 5th, 2020
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. import math
  2.  
  3. kg_lemons = float(input())
  4. kg_sugar = float(input())
  5. l_water = float(input()) * 1000
  6.  
  7. ml_lemon_juice = kg_lemons * 980
  8.  
  9. ml_lemonade = ml_lemon_juice + l_water + (0.3 * kg_sugar)
  10. sold_cups = math.floor(ml_lemonade / 150)
  11. earnings = sold_cups * 1.2
  12.  
  13. print(f'All cups sold: {sold_cups}')
  14. print(f'Money earned: {earnings:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment