Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- days = int(input())
- food = float(input())
- dog_food = 0
- cat_food = 0
- cookies = 0
- for i in range(1, days + 1):
- dog = float(input())
- cat = float(input())
- if i % 3 == 0:
- cookies += (dog + cat) / 10
- dog_food += dog
- cat_food += cat
- eat_food = dog_food + cat_food
- print(f"Total eaten biscuits: {round(cookies)}gr.")
- print(f"{(eat_food / food * 100):.2f}% of the food has been eaten.")
- print(f"{(dog_food / eat_food * 100):.2f}% eaten from the dog.")
- print(f"{(cat_food / eat_food * 100):.2f}% eaten from the cat.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement