Spocoman

05. Godzilla vs. Kong

Dec 16th, 2021 (edited)
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.71 KB | None | 0 0
  1. budget = float(input()) * 0.9
  2. statists = int(input())
  3. dress = float(input())
  4.  
  5. if statists > 150:
  6.     dress *= 0.9
  7.  
  8. budget -= statists * dress
  9.  
  10. if budget < 0:
  11.     print('Not enough money!')
  12.     print(f'Wingard needs {abs(budget):.2f} leva more.')
  13. else:
  14.     print('Action!')
  15.     print(f'Wingard starts filming with {budget:.2f} leva left.')
  16.  
  17.  
  18. Pешение с тернарен оператор и \n:)
  19.  
  20. budget = float(input()) * 0.9
  21. statists = int(input())
  22. dress = float(input())
  23.  
  24. budget -= statists * (0.9 if statists > 150 else 1) * dress
  25.  
  26. print(f'Not enough money! \nWingard needs {abs(budget):.2f} leva more.' if budget < 0
  27.       else f'Action! \nWingard starts filming with {budget:.2f} leva left.')
  28.  
Add Comment
Please, Sign In to add comment