Advertisement
simeonshopov

Football kit

Nov 2nd, 2019
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. t_shirt_price = float(input())
  2. present_money = float(input())
  3.  
  4. shorts_price = t_shirt_price * 0.75
  5. socks = shorts_price * 0.2
  6. shoes = (t_shirt_price + shorts_price) * 2
  7. total = (t_shirt_price + shorts_price + shoes + socks) * 0.85
  8.  
  9. if total >= present_money:
  10.     print(f"Yes, he will earn the world-cup replica ball!\nHis sum is {total:.2f} lv.")
  11. else:
  12.     print(f"No, he will not earn the world-cup replica ball.\nHe needs {(present_money - total):.2f} lv. more.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement