Advertisement
bl00dt3ars

p1

Jul 10th, 2021
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. food = float(input()) * 1000
  2. hay = float(input()) * 1000
  3. cover = float(input()) * 1000
  4. pig_weight = float(input()) * 1000
  5.  
  6. for i in range(1, 31):
  7.     food -= 300
  8.     if i % 2 == 0:
  9.         hay -= food * 5 / 100
  10.     if i % 3 == 0:
  11.         cover -= pig_weight / 3
  12.  
  13.     if food <= 0 or hay <= 0 or cover <= 0:
  14.         print(f"Merry must go to the pet store!")
  15.         exit()
  16.  
  17. print(f"Everything is fine! Puppy is happy! Food: {food / 1000:.2f}, Hay: {hay / 1000:.2f}, Cover: {cover / 1000:.2f}.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement