viligen

guinea_pig

Oct 21st, 2021
796
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. food_month = float(input()) * 1000
  2. hay_kg = float(input()) * 1000
  3. cover_kg = float(input()) * 1000
  4. guinea_weight = float(input()) * 1000
  5.  
  6. for day in range(1, 31):
  7.     food_month -= 300
  8.     if food_month <= 0 or hay_kg <= 0 or cover_kg <= 0:
  9.         print("Merry must go to the pet store!")
  10.         break
  11.     if day % 2 == 0:
  12.         hay_kg -= 0.05 * food_month
  13.     if day % 3 == 0:
  14.         cover_kg -= guinea_weight / 3
  15.  
  16. else:
  17.     print(f"Everything is fine! Puppy is happy! Food: {food_month / 1000:.2f}, Hay: {hay_kg / 1000:.2f}, Cover: {cover_kg / 1000:.2f}.")
  18.  
RAW Paste Data