SHARE
TWEET

Christmas_Market

aneliabogeva Apr 18th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import math
  2. money_needed = float(input())
  3.  
  4. number_fantasy_book = int(input())
  5. number_horror_book = int(input())
  6. numbe_romatic_book = int(input())
  7.  
  8. sum_fantasy = number_fantasy_book * 14.90
  9. sum_horro = number_horror_book * 9.80
  10. sum_romantic = numbe_romatic_book * 4.30
  11.  
  12. sum_book = sum_fantasy+sum_horro+sum_romantic
  13. total_sum = sum_book*0.80
  14.  
  15. if total_sum > money_needed:
  16.     sum_salary = math.floor((total_sum-money_needed)*0.10)
  17.     print(f"{(total_sum - sum_salary):.2f} leva donated.")
  18.     print(f"Sellers will receive {sum_salary} leva.")
  19. else:
  20.     print(f"{(money_needed-total_sum):.2f} money needed.")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top