BbJLeB

02. Wedding Party

Apr 23rd, 2019
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. import math
  2. guest = int(input())
  3. budget = int(input())
  4. cuvert = guest * 20
  5.  
  6. if cuvert <= budget:
  7.     money = budget - cuvert
  8.     fireworks = math.trunc(money - (money * 0.4))
  9.     money_end = math.trunc(money - fireworks)
  10.     print (f"Yes! {math.trunc(money_end)} lv are for fireworks and {math.trunc(fireworks)} lv are for donation.")
  11. else:
  12.     money1 = cuvert - budget
  13.     print (f"They won't have enough money to pay the covert. They will need {math.trunc(money1)} lv more.")
Advertisement
Add Comment
Please, Sign In to add comment