Advertisement
Spocoman

Cat Diet

Jan 7th, 2022
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. fats = int(input())
  2. proteins = int(input())
  3. carbohydrates = int(input())
  4. calories = int(input())
  5. water = int(input())
  6. caloriesPerGram = (100 - water) * (calories / (calories * fats / 9 + calories * proteins / 4 + calories * carbohydrates / 4))
  7. print(f'{caloriesPerGram:.4f}')
  8.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement