Advertisement
bl00dt3ars

02. Football Kit

Nov 22nd, 2020
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. shirt = float(input())
  2. target_sum = float(input())
  3.  
  4. shorts = shirt * 0.75
  5. socks = shorts * 0.2
  6. buttons = (shirt + shorts) * 2
  7. total = (shirt + shorts + socks + buttons) * 0.85
  8.  
  9. if total >= target_sum:
  10.     print("Yes, he will earn the world-cup replica ball!")
  11.     print(f"His sum is {total:.2f} lv.")
  12. else:
  13.     print("No, he will not earn the world-cup replica ball.")
  14.     print(f"He needs {target_sum - total:.2f} lv. more.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement