Advertisement
dkyoseff

Conditional Statements - Lab / 05. Godzilla vs. Kong

Jul 11th, 2022
894
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. budget = float(input())
  2. statist = float(input())
  3. priceClothesStatist = float(input())
  4.  
  5. priceDecor = (budget * 10) / 100
  6.  
  7. priceClothes = statist * priceClothesStatist
  8. if statist >= 150:
  9.     priceClothes = priceClothes - ((priceClothes * 10) / 100)
  10.  
  11. summaryPrice = priceDecor + priceClothes
  12.  
  13. moneyLeft = (budget - summaryPrice)
  14.  
  15. # moneyLeft = abs(moneyLeft)
  16.  
  17. if moneyLeft >= 0:
  18.     print(f'Action!')
  19.     print(f'Wingard starts filming with {abs(moneyLeft):.2f} leva left.')
  20.  
  21. else:
  22.  
  23.     print(f'Not enough money!')
  24.     print(f'Wingard needs {abs(moneyLeft):.2f} leva more.')
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement